XML DOM » Node » xml

Compability: Internet Explorer

Syntax:
node.xml

This property 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:

Examples

Code:
XML:

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

VBScript:

Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = True
objXMLDoc.load("albums.xml")

Set Album = objXMLDoc.documentElement.lastChild
document.write(Album.xml)
Output:
&cw;
Red Dirt Girl
Emmylou Harris
Explanation:

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

Language(s): VBScript XML