IXMLDOMCharacterData

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

IXMLDOMCharacterData

Provides text manipulation methods that are used by several objects.

[Script]

Example

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.5.0");
var nodeDescription;
xmlDoc.async = false;
xmlDoc.setProperty("SelectionLanguage", "XPath");
xmlDoc.load("books.xml");
if (xmlDoc.parseError.errorCode != 0) {
   var myErr = xmlDoc.parseError;
   alert("You have error " + myErr.reason);
} else {
   nodeDescription = xmlDoc.selectSingleNode("//description");
   alert(nodeDescription.text);
}
[Visual Basic]

Example

Dim xmlDoc As New Msxml2.DOMDocument50
Dim nodeDescription As IXMLDOMElement
xmlDoc.async = False
xmlDoc.setProperty "SelectionLanguage", "XPath"
xmlDoc.Load "books.xml"
If (xmlDoc.parseError.errorCode <> 0) Then
   Dim myErr
   Set myErr = xmlDoc.parseError
   MsgBox("You have error " & myErr.reason)
Else
   Set nodeDescription = xmlDoc.selectSingleNode("//description")
   MsgBox nodeDescription.Text
End If

Remarks

IXMLDOMCharacterData does not directly correspond to any node type. Methods are reused by IXMLDOMCDATASection, IXMLDOMComment, and IXMLDOMText. These methods handle large amounts of text, including sizes larger than can be manipulated natively using string constructs.

Requirements

Implementation: msxml5.dll, msxml2.lib

[C/C++]

Header and IDL files: msxml2.h, msxml2.idl

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

Versioning

MSXML 2.0 and later

See Also

IXMLDOMCDATASection | IXMLDOMCharacterData Members | IXMLDOMComment | IXMLDOMElement | IXMLDOMText