• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

want to replace a value in XML tag

 
mou haj
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
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.
Regards
Moumita
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look in to this tutorial here, which shows how you can edit/add/remove nodex of a XML document.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic