PDA

View Full Version : how to write out an XML Document object


wac
03-06-2003, 07:46 PM
I realize some of this is trivial, but...
Why is there not a write method on org.wc3.dom.Document?
I can use it to parse a file but it seems that I have to write
my own code to write Document back out once I've made updates. I know its "easy" to write this code, but somehow I thought that this was built into the object.
Is that not true???

jkd
03-06-2003, 09:14 PM
http://www.w3.org/TR/2003/WD-DOM-Level-3-LS-20030226/

The Load and Save interface takes care of all that.

Alex Vincent
03-07-2003, 01:11 AM
Originally posted by wac
I realize some of this is trivial, but...
Why is there not a write method on org.wc3.dom.Document?

document.write is a method provided in the HTML DOM specifically for backwards-compatibility with older browsers. With the Document Object Model Core, there should be no reason to force the XML parser to accept unparsed code directly from a script.