Smart Pointer Classes and DOM Properties
The syntax for invoking DOM properties using raw interface pointers differs from that using smart pointer classes. We use the async
property as an example.
Raw Interface Syntax
HRESULT get_async( [out, retval] VAIRANT_BOOL *isAsync ); HRESULT put_async( [in] VAIRANT_BOOL isAsync );
For example,
hr = pXMLDom->get_async(&vbAsync); if (vbAsync == VARIANT_TRUE) { hr = pXMLDom->put_async(VARIANT_FALSE); }
where hr
, pXMLDom
, and vbAsync
are of the HRESULT
, IXMLDOMDocument
*, and VARIANT_BOOL
types, respectively.
Smart Pointer Class Wrapper Syntax
VARIANT_BOOL async
For example,
If (pXMLDom->async == VARIANT_TRUE) { pXMLDom->async = VARIANT_FALSE; }
Notice that invoking the DOM property using smart pointer classes is similar to using script or Visual Basic.
Now we are ready start working with XML DOM. First, we'll Load an XML DOM Object from an XML File.