July 3, 2008

Loading XML with Microsoft's XML Parser in JavaScript

xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("books.xml")

The first line creates an empty Microsoft XML
document object.

The second line turns off asynchronized loading, to make sure that
the parser will not continue execution of the script before
the document is fully loaded.

The third line tells the parser to load an XML document
called "books.xml".

No comments: