jQuery in Action, 2nd edition*
The moose likes XML and Related Technologies and the fly likes Editing an XML file Stored in Database 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 "Editing an XML file Stored in Database" Watch "Editing an XML file Stored in Database" New topic

Editing an XML file Stored in Database

Varshini Priya
Ranch Hand

Joined: Feb 17, 2008
Posts: 93

Hi All,

I have an XML file stored as a BLOB in one of the tables in the Database. Im not sure how to edit the Xml file and store it back in the Database Please help me edit the XML file .

Thanks in Advance

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12756
The steps are going to be:

1. recover the blob from database
2. create a stream that reads the contents of the blob
3. feed the stream to a parser to create a DOM (Document Object Model) of the document in memory
4. modify the DOM
5. serialize the DOM back to text
6. store the modified text in database

How far have you gotten?
How familiar are you with Java's XML related library?

jQuery in Action, 2nd edition
subject: Editing an XML file Stored in Database
Similar Threads
Connecting to number of databases.
How to do XML to DB using Message Driven Bean?
List of downloaded files has to appear based on the User
Where is the database settings of JBoss stored on Linux
how to open a file using saved on database using java code