data Property (IXMLDOMCharacterData) (Compact 2013)

3/26/2014

Stores the node data depending on the node type.

Syntax

strValue = oXMLDOMCharacterData.data;
objXMLDOMCharacterData.data = strValue;
HRESULT get_data(
  BSTR* data
);
HRESULT put_data(
  BSTR data
);

Parameters

Script

None.

C/C++

  • data
    [in] [out, retval] Same value as the nodeValue for this node.

Return Value

Script

String. Returns the same value as the nodeValue for this node.

C/C++

  • S_OK
    Value returned if successful.
  • S_FALSE (for get_data only)
    Value returned if there is no character data node.
  • E_INVALIDARG (for get_data only)
    Value returned if data is Null.
  • E_FAIL (for put_data only)
    Value returned if an error occurs.

Remarks

It contains the same value as the nodeValue for this node. The meaning of the value depends on the nodeType property of the IXMLDOMNode, as follows.

Value

Description

NODE_CDATA_SECTION

A string representing the text stored in the CDATA section.

NODE_COMMENT

The content of the comment, exclusive of the comment start and end sequence.

NODE_TEXT

A string representing the text stored in the text node.

This property is read/write, and applies to the following objects and interfaces:

IXMLDOMCDATASection, IXMLDOMCharacterData, IXMLDOMComment, IXMLDOMNode, and IXMLDOMText

Requirements

Header

msxml2.h,
msxml2.idl

See Also

Reference

XML DOM Properties
nodeType Property
nodeValue Property