File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes want to replace a value in XML tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "want to replace a value in XML tag" Watch "want to replace a value in XML tag" New topic

want to replace a value in XML tag

mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
Im reading from a XML file ( say xml1.xml) and displaying ( in editable fields) the values in a jsp.
Im reading the values as
InstCountry = QUOTE_DATA_Information.getElementsByTagName("DEST_COUNTRY").item(0).getFirstChild().getNodeValue();
The user may change the value and i have to update the same xml file. Instead of writing the whole file i want to replace the changed values in the same XML file.
Is this possible. Please tell me how is it possible.
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Have a look in to this tutorial here, which shows how you can edit/add/remove nodex of a XML document.

Spritle Software Blogs
I agree. Here's the link:
subject: want to replace a value in XML tag
It's not a secret anymore!