This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I need everything BUT "<?xml version=1.0...>" as a DOM. Can I remove it with removeChild? Does it have a parent node?
No, that's a completely wrong understanding of DOM. Your DOM only contains the nodes of the document. It doesn't "contain" the prolog from the text version of the document; the prolog is produced when you serialize the DOM.
If you don't want your serialized document to contain a prolog, then do something differently in the serialization process to exclude the prolog.
Joined: May 07, 2010
Thanks, I didn't know all these things. Import node worked like a charm once I got the hang of it.