RXmlEngXPathExpression Class Reference

class RXmlEngXPathExpression

A compiled XPath expression is a textual expression transformed after syntactical analysis into some internal representation of the expression. The only missing element for evaluation of the expression is evaluation context: the context node (where to start) and an optional set of prefix-to-namespace bindings.

XPath Expressions are created and instantiated by the Evaluator: TXmlEngXPathEvaluator

See the XPath spec here: http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.html

Public Member Functions
RXmlEngXPathExpression()
voidClose()
IMPORT_C voidDestroy()
IMPORT_C RXmlEngXPathResultEvaluateL(TXmlEngNode, const MXmlEngNamespaceResolver *)
IMPORT_C RXmlEngXPathResultEvaluateWithDependenciesL(TXmlEngNode, RXmlEngNodeSet &, const MXmlEngNamespaceResolver *)
IMPORT_C void *ExtendedContext()
IMPORT_C voidSetExtendedContext(void *)
Private Member Functions
RXmlEngXPathExpression(void *, void *)
Public Member Enumerations
enumTXmlEngXPathExpressionPartType { EFunction, EPrefix }
Private Attributes
void *iInternal
void *iInternal2
TInt32 reserved1
TAny *reserved2

Constructor & Destructor Documentation

RXmlEngXPathExpression()

IMPORT_CRXmlEngXPathExpression()

Default constructor

RXmlEngXPathExpression(void *, void *)

RXmlEngXPathExpression(void *aData,
void *aData2
)[private]

Parameters

void * aData
void * aData2

Member Functions Documentation

Close()

voidClose()[inline]

Resets the compiled expression and frees the allocated memory

Destroy()

IMPORT_C voidDestroy()

Resets the compiled expression and frees the allocated memory

EvaluateL(TXmlEngNode, const MXmlEngNamespaceResolver *)

IMPORT_C RXmlEngXPathResultEvaluateL(TXmlEngNodeaContextNode,
const MXmlEngNamespaceResolver *aResolver = NULL
)const

Evaluates this expression.

Result of evaluation

leave

KXmlEngErrXPathResult Error evaluating expression

leave

KXmlEngErrXPathSyntax Error compiling expression

leave

KErrNoMemory Memory allocation error

leave

  • Otherwise, any of the system wide errors.

Parameters

TXmlEngNode aContextNodeThe node relative to which the expression is evaluated.
const MXmlEngNamespaceResolver * aResolver = NULLNot supported in current API. Reserved for future use.

EvaluateWithDependenciesL(TXmlEngNode, RXmlEngNodeSet &, const MXmlEngNamespaceResolver *)

IMPORT_C RXmlEngXPathResultEvaluateWithDependenciesL(TXmlEngNodeaContextNode,
RXmlEngNodeSet &aDependents,
const MXmlEngNamespaceResolver *aResolver = NULL
)const

Does the same thing as EvaluateL(), but also calculates the dependency list of the expression.

Result of evaluation

leave

KXmlEngErrXPathResult Error evaluating expression

leave

KXmlEngErrXPathSyntax Error compiling expression

leave

KErrNoMemory Memory allocation error

leave

  • Otherwise, any of the system wide errors.

Parameters

TXmlEngNode aContextNodeThe node relative to which the expression is evaluated.
RXmlEngNodeSet & aDependentsAfter the method has returned, contains set of nodes that the expression is dependent on.
const MXmlEngNamespaceResolver * aResolver = NULLNot supported in current API. Reserved for future use.

ExtendedContext()

IMPORT_C void *ExtendedContext()const

Gets extended context data for the expression currently being evaluated.

Extended context pointer or NULL if not sete

SetExtendedContext

SetExtendedContext(void *)

IMPORT_C voidSetExtendedContext(void *aContext)

Set context data for the expression currently being evaluated.

Extended Context is data set by API users and available for XPath extension functions. For more information: RXmlEngXPathExpression

Parameters

void * aContextExtended context pointer

Member Enumerations Documentation

Enum TXmlEngXPathExpressionPartType

XPath expression parts

Enumerators

EFunction
EPrefix

Member Data Documentation

void * iInternal

void *iInternal[private]

void * iInternal2

void *iInternal2[private]

TInt32 reserved1

TInt32 reserved1[private]

TAny * reserved2

TAny *reserved2[private]