All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

XMLParser Interface CATIDOMCharacterData

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---XMLParser.CATIDOMNode
        |
        +---CATIDOMCharacterData
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIDOMCharacterData

Interface extending CATIDOMNode with a set of methods for accessing character data in the DOM.
For clarity this set is defined here rather than on each class that uses these methods. No DOM objects correspond directly to CATIDOMCharacterData, though CATIDOMText and others do inherit the interface from it. All offsets in this interface start from 0, and index in terms of Unicode 16 bit storage units.

See also:
CATIDOMText


Method Index


o AppendData(CATUnicodeString&)
Appends the string to the end of the character data of the node.
o DeleteData(unsigned int,unsigned int)
Removes a range of characters from the node.
o GetData(CATUnicodeString&)
Retrieves the character data of the node that implements this interface.
o GetLength(unsigned int&)
Retrieves the number of characters that are available through data and the SubstringData method below.
o InsertData(unsigned int,CATUnicodeString&)
Inserts a string at the specified character offset.
o ReplaceData(unsigned int,unsigned int,CATUnicodeString&)
Replaces the characters starting at the specified character offset with the specified string.
o SetData(CATUnicodeString&)
Sets the character data of the node that implements this interface.
o SubstringData(unsigned int,unsigned int,CATUnicodeString&)
Extracts a range of data from the node.

Methods


o AppendData
public virtual HRESULT AppendData( const CATUnicodeString& iAppendedData) = 0
Appends the string to the end of the character data of the node. Upon success, GetData provides access to the concatenation of data and the CATUnicodeString specified.
Parameters:
iAppendedData
The
CATUnicodeString to append.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
o DeleteData
public virtual HRESULT DeleteData(unsigned int iOffSet,
unsigned int iCount) = 0
Removes a range of characters from the node. Upon success, the returned values of GetData and GetLength reflect the change.
Parameters:
iOffSet
The offset from which to remove characters.
iCount
The number of characters to delete. If the sum of iOffset and iCount exceeds the value returned by
GetLength then all characters from iOffset to the end of the data are deleted.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2201 INDEX_SIZE_ERR: Raised if the specified iOffset is greater than the number of characters in data.
CATDOMException XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
o GetData
public virtual HRESULT GetData(CATUnicodeString& oData) = 0
Retrieves the character data of the node that implements this interface. The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a CATIDOMCharacterData node. However, implementation limits may mean that the entirety of a node's data may not fit into a single call to GetData. In such cases, the user may call SubstringData to retrieve the data in appropriately sized pieces.
Parameters:
oData
the character data of the node that implements this interface
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2202 DOMSTRING_SIZE_ERR: Raised when it would return more characters than supported by the underlying implementation.
o GetLength
public virtual HRESULT GetLength(unsigned int& oLength) = 0
Retrieves the number of characters that are available through data and the SubstringData method below. This may have the value zero, i.e., CharacterData nodes may be empty.
Parameters:
oLength
The retrieved number of characters that are available through data.
See also:
SubstringData
o InsertData
public virtual HRESULT InsertData(unsigned int iOffSet,
const CATUnicodeString& iInsertedData) = 0
Inserts a string at the specified character offset.
Parameters:
iOffSet
The character offset at which to insert.
iInsertedData
The
CATUnicodeString to insert.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2201 INDEX_SIZE_ERR: Raised if the specified iOffset is greater than the number of characters in data.
CATDOMException XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
o ReplaceData
public virtual HRESULT ReplaceData(unsigned int iOffSet,
unsigned int iCount,
const CATUnicodeString& iArg) = 0
Replaces the characters starting at the specified character offset with the specified string.
Parameters:
iOffSet
The offset from which to start replacing.
iCount
The number of characters to replace. If the sum of iOffSet and iCount exceeds the value returned by
GetLength, then all characters to the end of the data are replaced (i.e., the effect is the same as a DeleteData method call with the same range, followed by an AppendData method invocation).
iArg
The
CATUnicodeString with which the range must be replaced.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2201 INDEX_SIZE_ERR: Raised if the specified iOffset is greater than the number of characters in data.
CATDOMException XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
o SetData
public virtual HRESULT SetData( const CATUnicodeString& iData) = 0
Sets the character data of the node that implements this interface. The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a CATIDOMCharacterData node. However, implementation limits may mean that the entirety of a node's data may not fit into a single call to GetData. In such cases, the user may call SubstringData to retrieve the data in appropriately sized pieces.
Parameters:
iData
The
CATUnicodeString to set.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
CATDOMException XMLParserERR_2202 DOMSTRING_SIZE_ERR: Raised when it would return more characters than supported by the underlying implementation.
o SubstringData
public virtual HRESULT SubstringData(unsigned int iOffSet,
unsigned int iCount,
CATUnicodeString& oSubstringData) = 0
Extracts a range of data from the node.
Parameters:
iOffset
Start offset of substring to extract.
iCount
The number of characters to extract.
oSubstringData
The specified substring. If the sum of iOffset and iCount exceeds the value returned by
GetLength, then all characters to the end of the data are returned.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2201 INDEX_SIZE_ERR: Raised if the specified iOffset is greater than the number of characters in data.
CATDOMException XMLParserERR_2202 DOMSTRING_SIZE_ERR: Raised when it would return more characters than supported by the underlying implementation.
See also:
GetLength

This object is included in the file: CATIDOMCharacterData.h
If needed, your Imakefile.mk should include the module: CATXMLParserItf

Copyright © 2003, Dassault Systèmes. All rights reserved.