i have chunk of code parsing xml variables. on 1 of variables, there never more 12 there may less. trying define each of these variables multiple times second. need them defined if have variable because right now, if there less 12 variables, program crashes. right code below works, if there 12 values present in xml document. how itterate code don't have list of "if != null" statements? var _vol1 = (ipts[0].volume); var _vol2 = (ipts[1].volume); .... .... var _vol12 = (ipts[11].volume); this code works when 12 values in xml document crashes if there less 12 might case. how structure code define/redefine variable if there value , not null? what needs iterated???? if ((ipts[0].volume) != null ){ var _vol1 = (ipts[0].volume); } i researched on haxe website wasnt sure applicable. syntax , programming not greatest. help. sorry if bad question. update: here complete code of now. doesn't crash not defining volume variables anymore added if statements var...