Click to return to the XML (Extensible Markup Language) home page    
IXMLDOMCharacterData::app...     IXMLDOMCharacterData::del...     IXMLDOMCharacterData Inte...    
Web Workshop  |  XML (Extensible Markup Language)

IXMLDOMCharacterData::get_data Method


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

Visual Basic Syntax

strValue = oXMLDOMCharacterData.data

C/C++ Syntax

HRESULT get_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_INVALIDARG
Value returned if data is null.


IXMLDOMCharacterData::put_data Method


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.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.