Re: Document.load()?
Martin Honnen <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
Lucian wrote: > I've been reading at various places about how to load an xml file using > DOM Document.load() and getting the result by handling the onload event. > Or setting async to false to have load return synchronously. Now I've > been searching the web for hours for a reference describing these > things. Couldn't find them in the W3 DOM spec, nor in the gecko DOM > reference. > This particular excerpt from "JavaScript: the definitive guide, 4th ed" > refers to the technique as being a "standard DOM level 2": > http://www.webreference.com/programming/javascript/definitive/chap17/11.html > > > but nowhere in the DOM level 2 specification could I find them. And none > of the interfaces there are describing *events* like onload. > Would anyone be so kind as to shed some light on this? > Thank you in advance! The load method on an XML DOM document object is not part of the W3C DOM specification, rather it is an extension first introduced by Microsoft in MSXML, Microsoft's COM based XML software package, and later also implemented for XML DOM documents in Mozilla and by now in Opera too. Safari I think does not implement it. The W3C DOM way is the W3C DOM Level 3 Load and Save module. Mozilla does not implement that at all I think (at least not in Gecko 1.8/Firefox 2.0) while Opera 9 has support for that. The MSXML documentation is online here: <URL:http://msdn2.microsoft.com/en-us/library/ms763742.aspx>, the load method of MSXML is documented here: <URL:http://msdn2.microsoft.com/en-us/library/ms762722(VS.85).aspx> Mozilla's load method is mentioned here: <URL:http://developer.mozilla.org/en/docs/XML_in_Mozilla#DOM_Load_and_Save_Methods> -- Martin Honnen http://JavaScript.FAQTs.com/