Click to return to the XML (Extensible Markup Language) home page    
XMLDOMComment Object     XMLDOMDocumentFragment Ob...     XML XMLDOM Objects    
Web Workshop  |  XML (Extensible Markup Language)

XMLDOMDocument Object


This object represents the top level of the XML source. It includes methods and properties to obtain or create all other XML objects.

Members

Remarks

The XMLDOMDocument object represents the top node in the tree. It implements all of the base DOM document methods and provides additional methods and properties that support XSL and XML transformations.

Although there are many programming objects, only one object can be created: the document. All other interfaces are accessed or created from the document.

The document can be created using either a free-threaded or a rental threading model. The behavior of the two models is identical; rental-threaded documents exhibit better performance because the parser need not manage concurrent access among threads. Note that you cannot combine nodes or documents that are created using differing threading models. The document threading model is determined by the following settings.

SettingRental-threaded modelFree-threaded model
Version Independent ProgID Microsoft.XMLDOM Microsoft.FreeThreadedXMLDOM
ProgID Microsoft.XMLDOM.1.0 Microsoft.FreeThreadedXMLDOM.1.0
ClassID 2933BF90-7B36-11D2-B20E-00C04F983E60 2933BF91-7B36-11D2-B20E-00C04F983E60
VB Class Name DOMDocument FreeThreadedDOMDocument

Example

The following JScript examples demonstrate how to create the two types of objects:

var objDoc = new ActiveXObjet("Microsoft.XMLDOM"); var objFTDoc = new ActiveXObject("Microsoft.FreeThreadedXMLDOM");

And in VBScript,

Set objDoc = CreateObject("Microsoft.XMLDOM") Set objFTDoc = CreateObject("Microsoft.FreeThreadedXMLDOM")

See Also

XMLDOMNode



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.