Specifies the length, in characters, of the data.
lValue = oXMLDOMCharacterData.length;
The following example creates an IXMLDOMComment object and then assigns the length property to a variable.
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.5.0");
var comment;
var lValue;
xmlDoc.async = false;
xmlDoc.load("books.xml");
if (xmlDoc.parseError.errorCode <> 0) {
   var myErr = xmlDoc.parseError;
   alert("You have error " + myErr.reason);
} else {
   comment = xmlDoc.createComment("Hello World!");
   lValue = comment.length;
   alert(lValue);
}
lValue = oXMLDOMCharacterData.length
The following example creates an IXMLDOMComment object and then assigns the length property to a variable.
Dim xmlDoc As New Msxml2.DOMDocument50
Dim comment As IXMLDOMComment
Dim lValue As Long
xmlDoc.async = False
xmlDoc.Load ("books.xml")
If (xmlDoc.parseError.errorCode <> 0) Then
   Dim myErr
   Set myErr = xmlDoc.parseError
   MsgBox("You have error " & myErr.reason)
Else
   Set comment = xmlDoc.createComment("Hello World!")
   lValue = comment.length
   MsgBox lValue
End If
HRESULT get_length(
    long *dataLength);
data property.dataLength parameter is Null.Long integer. The property is read-only. It specifies the length, in Unicode characters, of the string present in the data property.
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button 
 in the upper-left corner of the page.
Applies to: IXMLDOMCDATASection | IXMLDOMCharacterData | IXMLDOMComment | IXMLDOMText