XPath package contains XPath processing related types and interfaces.
This chapter contains the following sections:
Table 8-1 summarizes the datatypes of the XPath package.
Table 8-1 Summary of Datatypes; XPath Package
| Datatype | Description | 
|---|---|
| 
 Defines XPath compiler identifiers.  | 
|
| 
 Defines object types for XPath 1.0 based implementations.  | 
|
| 
 XPath related exception codes.  | 
|
| 
 Defines XPath processor identifiers.  | 
Defines XPath compiler identifiers.
typedef enum XPathCompIdType {
   XvmXPathCompCXml = 1 
} XPathCompIdType;
Defines object types for XPath 1.0 based implementations.
typedef enum XPathObjType {
   XPOBJ_TYPE_UNKNOWN = 0,
   XPOBJ_TYPE_NDSET   = 1,
   XPOBJ_TYPE_BOOL    = 2,
   XPOBJ_TYPE_NUM     = 3,
   XPOBJ_TYPE_STR     = 4
} XPathObjType;
 
Table 8-2 summarizes the methods available through the CompProcessor interface.
Table 8-2 Summary of CompProcessor Methods; XPath Package
| Function | Summary | 
|---|---|
| 
 Get processor's Id.  | 
|
| 
 Evaluate XPath expression against given document.  | 
|
| 
 Evaluate compiled XPath expression against given document.  | 
Get processor Id.
virtual XPathPrIdType getProcessorId() const = 0;
(XPathPrIdType) Processor's Id
Inherited from Processor.
virtual XPathObject< Node>* process ( InputSource* isrc_ptr, oratext* xpath_exp) throw (XPathException) = 0;
| Parameter | Description | 
|---|---|
isrc_ptr  | 
instance document to process | 
xpath_exp  | 
XPATH expression | 
(XPathGenObject*) XPath object
Evaluates compiled XPath expression against given document.
virtual XPathObject< Node>* processWithBinXPath ( InputSource* isrc_ptr, ub2* bin_xpath) throw (XPathException) = 0;
| Parameter | Description | 
|---|---|
isrc_ptr  | 
instance document to process | 
bin_xpath  | 
compiled XPATH expression | 
(XPathGenObject*) XPath object
Table 8-3 summarizes the methods available through the Compiler interface.
Table 8-3 Summary of Compiler Methods; XPath Package
| Function | Summary | 
|---|---|
| 
 Compile XPath and return its compiled binary representation.  | 
|
| 
 Get the compiler's Id  | 
Table 8-4 summarizes the methods available through the NodeSet interface.
Table 8-4 Summary of NodeSet Methods; XPath Package
| Function | Summary | 
|---|---|
| 
 Get node given its index.  | 
|
| 
 Get   | 
Table 8-5 summarizes the methods available through the Processor interface.
Table 8-5 Summary of Processor Methods; XPath Package
| Function | Summary | 
|---|---|
| 
 Get processor's Id.  | 
|
| 
 Evaluate XPath expression against given document.  | 
Get processor Id.
virtual XPathPrIdType getProcessorId() const = 0;
(XPathPrIdType) Processor's Id
Evaluates XPath expression against given document and returns result XPath object.
virtual XPathObject< Node>* process ( InputSource* isrc_ptr, oratext* xpath_exp) throw (XPathException) = 0;
| Parameter | Description | 
|---|---|
isrc_ptr  | 
instance document to process | 
xpath_exp  | 
XPath expression | 
(XPathGenObject*) XPath object
Table 8-6 summarizes the methods available through the XPathException interface.
Table 8-6 Summary of XPathException Methods; XPath Package
| Function | Summary | 
|---|---|
| 
 Get Oracle XML error code embedded in the exception.  | 
|
| 
 Get current language (encoding) of error messages.  | 
|
| 
 Get Oracle XML error message.  | 
|
| 
 Get XPath exception code embedded in the exception.  | 
Virtual member function inherited from XmlException.
virtual unsigned getCode() const = 0;
(unsigned) numeric error code (0 on success)
Virtual member function inherited from XmlException.
virtual oratext* getMesLang() const = 0;
(oratext*) Current language (encoding) of error messages
Virtual member function inherited from XmlException.
virtual oratext* getMessage() const = 0;
(oratext *) Error message
This is a virtual member function that defines a prototype for implementation defined member functions returning XPath processor and compiler exception codes, defined in XPathExceptionCode, of the exceptional situations during execution.
virtual XPathExceptionCode getXPathCode() const = 0;
(XPathExceptionCode) exception code
Table 8-7 summarizes the methods available through the XPathObject interface.
Table 8-7 Summary of XPathObject Methods; XPath Package
| Function | Summary | 
|---|---|
| 
 Copy constructor.  | 
|
| 
 Get the node set.  | 
|
| 
 Get boolean from object.  | 
|
| 
 Get number from object.  | 
|
| 
 Get string from object.  | 
|
| 
 Get type from object.  |