Forums Register Login

Modifying XML File using JDOM

+Pie Number of slices to send: Send
I am using JDOM for manipulating my external XML file from within JSP. For retrieving information, it is working fine, but while modifying the Text of an element, it is not chaning the text , also it is not showing any error.
I have used both SAXBuilder and DOMBuilder classes and tried to change the text of particular element like:
Element nm = pt.getChild("name");
//where pt is the parent element of element "name"
nm = nm.setText("New Name");
But its not changing the text of the element to "New Name".
Can anyone help me?
Thanx in advance
+Pie Number of slices to send: Send

IMHO, you may be able to get a quicker response in the
XML forum.
Since we have JSPs involved, its seems okay in this
forum also.
regds.
- satya
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 734 times.
Similar Threads
Query about jDOM.
Modifying XML content using JDOM
Transform text file to xml
Displaying XML as XML in HTML
Trouble with Embedded HTML during XSLT Transformation using JDOM
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:59:28.