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 editing data in  xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "editing data in  xml file" Watch "editing data in  xml file" New topic

editing data in xml file

siva sankar
Ranch Hand

Joined: Jul 13, 2006
Posts: 68

I have a xml file ex.xml.Now i want to add some more data to the existing xml file through a java program using DOM.Can it be possible?if yes,how can we do this?

Thanks in Advance,
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Yes. Have a look at the JavaDocs for org.w3c.dom; you can add nodes, remove them, change attributes and values etc.
[ April 04, 2007: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: editing data in xml file
jQuery in Action, 3rd edition