wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes XML Data Manipulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Data Manipulation" Watch "XML Data Manipulation" New topic
Author

XML Data Manipulation

Sam Saha
Ranch Hand

Joined: Jan 23, 2010
Posts: 104
I am reading a XML file line by line as string. Now I wanted to manipulate the XML Data such that I can to pull up some data from the child Node and append into the parent Node and erase the child node which data I have appended. I can successfully write the whole Xml file. But I am not really sure how to append the the child data inside the parent Node. I would appreciate if someone can help me out.
For Example:
XML Data:


My Intension:


Here is my code where I am reading the XML Data line by line as a string.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You would be *much* better off treating XML as XML, and not as strings--start there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Data Manipulation
 
Similar Threads
Inserting a node in an existing xml document
evaluating XPath predicates - question
How to parse xml inpustream?
Parsing a TreeModel structure
Regarding xml parsing using dom