14 Replies Latest reply on May 10, 2015 6:58 AM by Harbs.

    Trouble deleting XML node

    Harbs. Level 6

      Assuming "item" is a node in some XML, I'm doing this:

       

      var children = item.children();
      var len = children.length();
      for(var i = len-1;i>=0; i--){
        delete children[i];
      }
      

       

      This SHOULD delete all child nodes in the "item" node.

       

      What I'm seeing is that the loop executes correctly with the correct number of deletes for the number of children, but no children are actually removed.

       

      Has anyone seen anything like this?

       

      Harbs