Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Editing an XML file Stored in Database

 
Varshini Priya
Ranch Hand
Posts: 95
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Regards
Varshini
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic