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 Adding data to an XML file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Adding data to an XML file?" Watch "Adding data to an XML file?" New topic

Adding data to an XML file?

Sam Smith

Joined: Oct 20, 2003
Posts: 7
I have created a JSP form that passes infromation into a javabean. I need to add this data to an existing XML document. Is there an easy way to do this using DOM? Using another JSP page I can create a new XML page from the form data using the class DocumentBuilderFactory, would it then be easier to combine the two XML files, how can I do this? Any ideas or links to tutorials on this subject will be much appreciated as I am way stuck.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62764

Moving to the XML and Related Technologies forum where I think you'll get better responses.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
The tuorial understanding DOM might help you to learn add/modify/remove xml using DOM
Sam Smith

Joined: Oct 20, 2003
Posts: 7
Cheers for that link, just what I was after.
I agree. Here's the link:
subject: Adding data to an XML file?