This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Data Manipulation" Watch "XML Data Manipulation" New topic

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

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:
subject: XML Data Manipulation
jQuery in Action, 3rd edition