Hey guys,

I am writing a desktop app to interact with XML. It reads the XML fine using the DocumentBuilderFactory, but when I try to save any changed to the XML file (e.g. setNodeValue()) the changes do not save.

As an example here is some code I tried, just to remove a node:

Element root = d.getDocumentElement();
            Node child = (Node)root.getFirstChild();

where d is the document object.

XML looks like the following:

			<node1 name="blah" nodeName="blah2" />    
				<dir name="pathname" type="run" />

Any help is appreciated.

Cheers, I am fairly sure your suggestion is what I need. Thought it was something like that.

This article has been dead for over six months. Start a new discussion instead.