Microsoft XML 2.5 SDK


 

IXMLDOMCharacterData::put_data Method

[This is preliminary documentation and subject to change.]

Contains this node's data, which depends on the node type.

Visual Basic Syntax

objXMLDOMCharacterData.data = strValue

C/C++ Syntax

HRESULT put_data(

    BSTR data);

Parameters

data

[out]
Same value as the nodeValue for this node. See the Remarks section below.

C/C++ Return Values

S_OK

Value returned if successful.

E_FAIL

Value returned if an error occurs.

Remarks

This value depends on the value of the IXMLDOMNode object's nodeType property, as follows:

NODE_CDATA_SECTION

Contains a string representing the text stored in the CDATA section.

NODE_COMMENT

Contains the content of the comment, exclusive of the comment begin and end sequence.

NODE_TEXT

Contains a string representing the text stored in the text node.

This method returns an error if the data size is larger than can be stored in a single string. In that case, the data must be obtained using multiple calls to substringData.