Skip Headers
Oracle® Database XML C++ API Reference
11g Release 2 (11.2)

Part Number E10771-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
CPXML01800

8 Package XPath APIs for C++

XPath package contains XPath processing related types and interfaces.

This chapter contains the following sections:

See Also:

CPXML01806

XPath Datatypes

Table 8-1 summarizes the datatypes of the XPath package.

CPXML3007Table 8-1 Summary of Datatypes; XPath Package

Datatype Description

XPathCompIdType

Defines XPath compiler identifiers.

XPathObjType

Defines object types for XPath 1.0 based implementations.

XPathExceptionCode

XPath related exception codes.

XPathPrIdType

Defines XPath processor identifiers.


CPXML3008

XPathCompIdType

Defines XPath compiler identifiers.

CPXML3009Definition

typedef enum XPathCompIdType {
   XvmXPathCompCXml = 1 
} XPathCompIdType;
CPXML3010

XPathObjType

Defines object types for XPath 1.0 based implementations.

CPXML3011Definition

typedef enum XPathObjType {
   XPOBJ_TYPE_UNKNOWN = 0,
   XPOBJ_TYPE_NDSET   = 1,
   XPOBJ_TYPE_BOOL    = 2,
   XPOBJ_TYPE_NUM     = 3,
   XPOBJ_TYPE_STR     = 4
} XPathObjType;
 
CPXML3012

XPathExceptionCode

XPath related exception codes.

CPXML3013Definition

typedef enum XPathExceptionCode {
   XPATH_UNDEFINED_ERR = 0,
   XPATH_OTHER_ERR = 1 
} XPathExceptionCode;
CPXML3014

XPathPrIdType

Defines XPath processor identifiers.

CPXML3015Definition

typedef enum XPathPrIdType {      XPathPrCXml       = 1,      XvmPrCXml         = 2    } XPathPrIdType;
CPXML01810

CompProcessor Interface

Table 8-2 summarizes the methods available through the CompProcessor interface.

CPXML3016Table 8-2 Summary of CompProcessor Methods; XPath Package

Function Summary

getProcessorId()

Get processor's Id.

process()

Evaluate XPath expression against given document.

processWithBinXPath()

Evaluate compiled XPath expression against given document.


CPXML3017

getProcessorId()

Get processor Id.

CPXML3018Syntax

virtual XPathPrIdType getProcessorId() const = 0;

CPXML3019Returns

(XPathPrIdType) Processor's Id

CPXML3020

process()

Inherited from Processor.

CPXML3021Syntax

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

CPXML3022Returns

(XPathGenObject*) XPath object

CPXML3023

processWithBinXPath()

Evaluates compiled XPath expression against given document.

CPXML3024Syntax

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

CPXML3025Returns

(XPathGenObject*) XPath object

CPXML01820

Compiler Interface

Table 8-3 summarizes the methods available through the Compiler interface.

CPXML3026Table 8-3 Summary of Compiler Methods; XPath Package

Function Summary

compile()

Compile XPath and return its compiled binary representation.

getCompilerId()

Get the compiler's Id


CPXML3027

compile()

Compiles XPath and returns its compiled binary representation.

CPXML3028Syntax

virtual ub2* compile (
   oratext* xpath_exp)
throw (XPathException) = 0;
Parameter Description
xpath_exp
XPATH expression

CPXML3029Returns

(ub2) XPath expression in compiled binary representation

CPXML3030

getCompilerId()

Get compiler's id.

CPXML3031Syntax

virtual XPathCompIdType getCompilerId() const = 0;

CPXML3032Returns

(XPathCompIdType) Compiler's Id

CPXML01830

NodeSet Interface

Table 8-4 summarizes the methods available through the NodeSet interface.

CPXML3033Table 8-4 Summary of NodeSet Methods; XPath Package

Function Summary

getNode()

Get node given its index.

getSize()

Get NodeSet size.


CPXML3034

getNode()

Returns a reference to the node.

CPXML3035Syntax

NodeRef< Node>* getNode(
   ub4 idx) const;
Parameter Description
idx
index of the node in the set

CPXML3036Returns

(NodeRef) reference to the node

CPXML3037

getSize()

The size of the node set.

CPXML3038Syntax

ub4 getSize() const;

CPXML3039Returns

(ub4) node set size

CPXML01840

Processor Interface

Table 8-5 summarizes the methods available through the Processor interface.

CPXML3040Table 8-5 Summary of Processor Methods; XPath Package

Function Summary

getProcessorId()

Get processor's Id.

process()

Evaluate XPath expression against given document.


CPXML3041

getProcessorId()

Get processor Id.

CPXML3042Syntax

virtual XPathPrIdType getProcessorId() const = 0;

CPXML3043Returns

(XPathPrIdType) Processor's Id

CPXML3044

process()

Evaluates XPath expression against given document and returns result XPath object.

CPXML3045Syntax

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

CPXML3046Returns

(XPathGenObject*) XPath object

CPXML01850

XPathException Interface

Table 8-6 summarizes the methods available through the XPathException interface.

CPXML3047Table 8-6 Summary of XPathException Methods; XPath Package

Function Summary

getCode()

Get Oracle XML error code embedded in the exception.

getMesLang()

Get current language (encoding) of error messages.

getMessage()

Get Oracle XML error message.

getXPathCode()

Get XPath exception code embedded in the exception.


CPXML3048

getCode()

Virtual member function inherited from XmlException.

CPXML3049Syntax

virtual unsigned getCode() const = 0;

CPXML3050Returns

(unsigned) numeric error code (0 on success)

CPXML3051

getMesLang()

Virtual member function inherited from XmlException.

CPXML3052Syntax

virtual oratext* getMesLang() const = 0;

CPXML3053Returns

(oratext*) Current language (encoding) of error messages

CPXML3054

getMessage()

Virtual member function inherited from XmlException.

CPXML3055Syntax

virtual oratext* getMessage() const = 0;

CPXML3056Returns

(oratext *) Error message

CPXML3057

getXPathCode()

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.

CPXML3058Syntax

virtual XPathExceptionCode getXPathCode() const = 0;

CPXML3059Returns

(XPathExceptionCode) exception code

CPXML01860

XPathObject Interface

Table 8-7 summarizes the methods available through the XPathObject interface.

CPXML3060Table 8-7 Summary of XPathObject Methods; XPath Package

Function Summary

XPathObject()

Copy constructor.

getNodeSet()

Get the node set.

getObjBoolean()

Get boolean from object.

getObjNumber()

Get number from object.

getObjString()

Get string from object.

getObjType()

Get type from object.


CPXML3061

XPathObject()

Copy constructor.

CPXML3062Syntax

XPathObject( 
   XPathObject< Node>& src);
Parameter Description
src
reference to the object to be copied

CPXML3063Returns

(XPathObject) new object

CPXML3064

getNodeSet()

Get the node set.

CPXML3065Syntax

NodeSet< Node>* getNodeSet() const;
CPXML3066

getObjBoolean()

Get the boolean from the object.

CPXML3067Syntax

boolean getObjBoolean() const;
CPXML3068

getObjNumber()

Get the number from the object.

CPXML3069Syntax

double getObjNumber() const;
CPXML3070

getObjString()

Get the string from the object.

CPXML3071Syntax

oratext* getObjString() const;
CPXML3072

getObjType()

Get the type from the object.

CPXML3073Syntax

XPathObjType getObjType() const;
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

  • XPath Datatypes
    • XPathCompIdType
    • XPathObjType
    • XPathExceptionCode
    • XPathPrIdType
  • CompProcessor Interface
    • getProcessorId()
    • process()
    • processWithBinXPath()
  • Compiler Interface
    • compile()
    • getCompilerId()
  • NodeSet Interface
    • getNode()
    • getSize()
  • Processor Interface
    • getProcessorId()
    • process()
  • XPathException Interface
    • getCode()
    • getMesLang()
    • getMessage()
    • getXPathCode()
  • XPathObject Interface
    • XPathObject()
    • getNodeSet()
    • getObjBoolean()
    • getObjNumber()
    • getObjString()
    • getObjType()

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF