This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insert child node in xml adding and setting value

 
Roshan Chacko Techanath
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i generate(insert and append a node to) an xml using dom parser.
I want the xml to be physically visible and existing on the harddisk. Presently I am using the method
Node strnode=null;
strnode.setNodeValue("xyz");
It does create a node when i print it from the class. But it dosnt edit the physical file.The file remains as it is. I would like the file also to be edited so that I can use it for future data retrieval.
Can someone help meeeeeeee???

[ December 13, 2004: Message edited by: Roshan Chacko Techanath ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This uses Xerces to write the file, not sure if it's even possible with the built-in functionality of the JDK:



doc is an XML Document.
logger is a standard Logger
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This forum is for Servlet questions. I'll move this to the XML forum for you.

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic