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();
root.removeChild(child);
where d is the document object.
XML looks like the following:
<root>
<options>
<node1 name="blah" nodeName="blah2" />
</options>
<others>
<dir>
<dir name="pathname" type="run" />
</dir>
</others>
</root>
Any help is appreciated.