posted 18 years ago
When you have this structure:
<read>Reading xml files</read>
What you have is an org.w3c.dom.Element which has a single Child Node that is of type TEXT_NODE.
SO - in order to change the value, starting with the Element, you have to get the Node with getFirstChild() then setNodeValue("the new text")
Note that if you do a getNodeValue() on the Element, you get null.
I always find the table in the Javadocs for org.w3c.dom.Node to be extremely valuable.
Bill