XML.text (Property)

The textual content of the XML block.

Availability:

JScript - 5.0
Internet Explorer - 5.0
Property/method value type:String primitive
JavaScript syntax:IEmyXML.text

Any textual content will be yielded by this property, because XML support is still evolving, this property and the XML object may change.

For now, you will get all the text contained within the node and its children.

This means that for the example:

   <XML ID="myBlock">

   <METADATA>

   <OWNER>Wrox</OWNER>

   <DATATYPE>Example</DATATYPE>

   <ABSTRACT>This is an example block of text.</ABSTRACT>

   </METADATA>

   </XML>

The text for the top level object will be:

Wrox Example This is an example block of text.

The text for the object presented by the XMLDocument property will be the same as the text for the contained <METADATA> node.

The text for <OWNER>, <DATATYPE> and <ABSTRACT> nodes will be their individual content.

This means it is important to walk down the tree to the node or group of nodes you want before trying to extract the text.