KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm about to delete certain elements in an XML document, using code like the following: NodeList nodes = ...; for (int i = 0; i < nodes.getLength(); i++) { Element e = (Element)nodes.item(i); if (certain criteria involving Element e) { e.getParentNode().removeChild(e); } } Will this interfere with proper traversal of the NodeList? Any other caveats with this approach? If this is totally wrong, what's the proper way to do it?
Tags (comma-separated)
Save Edits
Cancel