PROPERTY:  Object::xml

This property is a Microsoft extension to the W3C DOM.

Object  Attr   CDATASection   CharacterData   Comment   Document   DocumentFragment   DocumentType   Entity   EntityReference   Node   Notation   ProcessingInstruction   Text

The xml property is read-only and contains the XML representation of this node and its descendants. This value for three of the node types, however, is slightly different depending on the nodeValue property. These nodes are:

    Returns a string representation of all the descendants of the document fragment.
    Returns a string representation of the <!DOCTYPE ... > declaration, including the internal subset, if specified.
    Returns a string representation of the entity reference, but not of its children.

In the following example, the code loads the 'albums.xml' file, and gets the xml property of the last 'Album' element and displays it.

   <Album ref="CD720">
      <title>Come On Over</title>
      <artist>Shania Twain</artist>
   <Album ref="CD024">
      <title>Red Dirt Girl</title>
      <artist>Emmylou Harris</artist>

Code (VBScript):
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = True

Set Album = objXMLDoc.documentElement.lastChild

Red Dirt Girl
Emmylou Harris

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information