Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DOM and data persistance

 
Rafal Chmielecki
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I have a prblem with storing data in the xml file - even if I update the Dom Document object (for example if I add a new node), the source xml file is not updated.
Is there any "flushing" posibilty for a Dom Document object?

------------------
Rafal Chmielecki
Pogrammer
TC:Reaktor (Warsaw, Poland)
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rafal, W3C specification DOM level 2 do not define methods for storing XML data in file. All DOM implementations provide extensions for it. For example, with MS DOM implementation for IE and JavaScript you would use XMLDOMDocument.save() method; with JDOM - XMLOutputter class and output () method. You should check documentation for your DOM implementation.
I think I read somewhere that DOM level3 will define methods for writing XML in file, but I am not sure.
Ah, yes, found it: Document Object Model (DOM) Level 3 Content Models and Load and Save Specification
[This message has been edited by Mapraputa Is (edited April 04, 2001).]
 
Yashnoo lyo
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mapraputa Is:
I have this problem and doesn't resolve it.Have you any idea to do this? That document you give seem can't help. I can't find any object to save node to xml file. It says:"permission denied"
If anyone have method to save text to xml file please help me.
Thanks in advanced!
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
 
Yashnoo lyo
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh Thks
oh I know.It means that I must do it using Java other than scriplet. I will use dom4j or jdom.
Some times I hope that java has some scriplet that can control xml like JScript or VBScript.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic