I have two node having same name. i want to modify one particular node value. For example
<names>
<name>one</name>
<name>two</name>
<name>three</name>
<name>four</name>
<name>five</name>
</names>
In the above example i want to change last node value “five” to new value “six”. is this possible in DOM..?? i am new to this concept, please guide me. Thanks for valuable replies.
Here’s an example of doing exactly what you describe.
http://www.java2s.com/Code/Java/XML/JavaDOMeditLocateaNodeandChangeItsContent.htm