An extension of DOMDocument that supports schema caching and validation features, and switching on XML Path Language (XPath) support.
var objDoc = new ActiveXObject("Msxml2.DOMDocument.5.0");
var objFTDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.5.0");
Dim objDoc As New Msxml2.DOMDocument50 Dim objFTDoc As New Msxml2.FreeThreadedDOMDocument50
The following C/C++ example creates DOMDocument and queries for the IXMLDOMDocument2 interface.
HRESULT hr;
IXMLDOMDocument2 * pXMLDoc = NULL;
//...
hr = CoInitialize(NULL); // Check the return value, hr...
hr = CoCreateInstance(CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument2, (void**)&pXMLDoc); // Check the return value, hr...
The following CLSIDs support IID_XMLDOMDocument2 in CoCreateInstance. The following progIDs return an object that can be cast into an IXMLDOMDocument2 interface in Microsoft® Visual Basic®. IXMLDOMDocument2 methods and properties are transparently available in late-bound scripting languages that go through IDispatch.
The same is true for DOMDocument objects exposed through the responseXML (IXMLHTTPRequest) property, and the DOMDocument and XSLDocument properties in the XML Multipurpose Internet Mail Extension (MIME) Viewer.
| CLSID | ProgID |
|---|---|
| CLSID_DOMDocument | Msxml2.DOMDocument |
| CLSID_DOMFreeThreadedDocument | Msxml2.FreeThreadedDOMDocument |
MSXML 2.6 and later
Implementation: msxml4.dll, msxml2.lib
Header and IDL files: msxml2.h, msxml2.idl
Version-Dependent ProgID: Msxml2.DOMDocument.5.0, Msxml2.FreeThreadedDOMDocument.5.0
Version-Dependent CLSID: 88d969c0-f192-11d4-a65f-0040963251e5
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button
in the upper-left corner of the page.
IXMLDOMDocument2 Members | DOMDocument