How to modify the XML Document?
I want to modify the data values present in the XML.
For Example the XML file is :
<student>
<student-name>venu</student-name>
<student-number>786</student-number>
</student>
Here I want to modify student-name and student-number values.
Actually my XML is not this simple.
I am able to get the values for the particular node by using XPath.
Like this:
String studentName = (String) xPath.evaluate(studentNamePath,xmlDocument,XPathConstants.STRING);
But how to modify the same node values?