The DOMDocument Object

The DOMDocument object is the main object you work with, and it represents the top node in every document tree. When working with the DOM, this is the only object you create directly.

As we'll see in this chapter, there are two ways to create document objects in Internet Explorer: using the Microsoft.XMLDOM class and using XML data islands. Creating a document object with the Microsoft.XMLDOM class looks like this—you explicitly load a document into the object with the load method:

function readXMLDocument() 
    var xmldoc
    xmldoc = new ActiveXObject("Microsoft.XMLDOM")

Microsoft.XMLDOM represents a fairly early version of Microsoft's XML (MSXML) support, but it also represents a common denominator ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.