IXMLDOMCharacterData::data Method
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 following Remarks section.
C/C++ Return Values
- S_OK
- Value returned if successful.
- S_FALSE
- Value returned if there is no character data node.
- E_INVALIDARG
- Value returned if data is Null.
IXMLDOMCharacterData::put_data Method
Assigns 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 [in]
- Same value as the nodeValue for this node. See the following Remarks section.
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 XMLDOMNode 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 start 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.
See Also
IXMLDOMCharacterData Interface