my dog learned polymorphism
The moose likes XML and Related Technologies and the fly likes refreshing a x ml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "refreshing a x ml file" Watch "refreshing a x ml file" New topic

refreshing a x ml file

siva sankar
Ranch Hand

Joined: Jul 13, 2006
Posts: 68

I am adding data to an existing xml file dynamically.But when i am doing like this,the old data is replacing with the new data.Is there any API or method to refresh the xml file so that no data should be lost when i add the data.

Thanks in Advance
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
How are you achieving this ? Are you reading the XML into a DOM and then add nodes to it and again serialize it back to a XML ?

Rahul Bhattacharjee
LinkedIn - Blog
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

The API is the one you are already using, I expect. You just have to use it differently. If you provided a small code example I am sure somebody could point out what exactly you should do differently.

(And by the way: when you say you are adding the data "dynamically", exactly what do you mean by that?)
I agree. Here's the link:
subject: refreshing a x ml file
It's not a secret anymore!