Avatar

Level 4

Ok I have a feeling the problem lies in my loop itself (as I said I adapted it from another use).

Is it due to how I'm defining the variable currentElement? I think it's referencing myParentObject.nodes

currentElement = allChildElements.item(i);

allChildElements = myParentObject.nodes;