9 Package XPointer APIs for C++
The XPointer package for C++ contains types and methods related to XPointer processing, such as XPointer datatypes, Processor methods, XppException methods, XPPLocation methods, and XppLocSet methods.
               
9.1 XPointer Datatypes
Table 9-1 summarizes the datatypes of the XPointer package.
                     
Table 9-1 Summary of Datatypes; XPointer Package
| Datatype | Description | 
|---|---|
| Defines XPath compiler identifiers. | |
| Defines XPointer processor identifiers. | |
| Defines location types for XPointer. | 
9.1.1 XppExceptionCode
XPointer related exception codes.
Definition
typedef enum XPathCompIdType {
   XvmXPathCompCXml = 1 
} XPathCompIdType;
9.1.2 XppPrIdType
Defines XPointer processor identifiers.
Definition
typedef enum XppPrIdType {   XPtrPrCXml         = 1} XppPrIdType;
 9.2 Processor Interface
Table 9-2 summarizes the methods available through the Processor interface.
                     
Table 9-2 Summary of Processor Methods; XPointer Package
| Function | Summary | 
|---|---|
| Get processor's Id. | |
| Evaluate XPointer expression against given document. | 
9.2.1 getProcessorId()
Get Processor Id.
Syntax
virtual XppPrIdType getProcessorId() const = 0;
Returns
(XppPrIdType) Processor's Id
                        
9.2.2 process()
Evaluates XPointer expression against given document and returns result XPointer location set object.
Syntax
virtual XppLocSet< Node>* process ( InputSource* isrc_ptr, oratext* xpp_exp) throw (XppException) = 0;
| Parameter | Description | 
|---|---|
| isrc_ptr | instance document to process | 
| xpp_exp | XPointer expression | 
Returns
(XppLocSet*) XPath object
                        
9.3 XppException Interface
Table 9-3 summarizes the methods available through the XPPException interface.
                     
Table 9-3 Summary of XppException Methods; Package XPointer
| Function | Summary | 
|---|---|
| Get Oracle XML error code embedded in the exception. | |
| Get current language (encoding) of error messages. | |
| Get Oracle XML error message. | |
| Get XPointer exception code embedded in the exception. | 
9.3.1 getCode()
Virtual member function inherited from XmlException.
                        
Syntax
virtual unsigned getCode() const = 0;
Returns
(unsigned) numeric error code (0 on success)
                        
9.3.2 getMesLang()
Virtual member function inherited from XmlException.
                        
Syntax
virtual oratext* getMesLang() const = 0;
Returns
(oratext*) Current language (encoding) of error messages
                        
9.3.3 getMessage()
Virtual member function inherited from XmlException.
                        
Syntax
virtual oratext* getMessage() const = 0;
Returns
(oratext *) Error message
                        
9.3.4 getXppCode()
This is a virtual member function that defines a prototype for implementation defined member functions returning XPointer processor and compiler exception codes, defined in XppExceptionCode, of the exceptional situations during execution.
Syntax
virtual XppExceptionCode getXppCode() const = 0;
Returns
(XppExceptionCode) exception code
                        
9.4 XppLocation Interface
Table 9-4 summarizes the methods available through the XppLocation interface.
                     
Table 9-4 Summary of XppLocation Methods; XPointer Package
| Function | Summary | 
|---|---|
| Get the location type. | |
| Get the node. | |
| Get range. | 
9.5 XppLocSet Interface
Table 9-5 summarizes the methods available through the XppLocSet interface.
                     
9.5.1 getItem()
Returns a reference to the item.
Syntax
XppLocation< Node>* getItem( ub4 index) const;
| Parameter | Description | 
|---|---|
| index | index of an item | 
Returns
(XppLocation*) reference to the item