RXmlEngXPathExpression Class Reference

#include <xml/dom/xmlengxpathexpression.h>

class RXmlEngXPathExpression

Detailed Description

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:

See also: TXmlEngXPathEvaluator

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

Member Enumeration Documentation

Enum TXmlEngXPathExpressionPartType

XPath expression parts

EnumeratorValueDescription
EFunction
EPrefix

Constructor & Destructor Documentation

RXmlEngXPathExpression ( )

IMPORT_CRXmlEngXPathExpression()

Default constructor

Member Function 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.

leave
KXmlEngErrXPathResult Error evaluating expression
leave
KXmlEngErrXPathSyntax Error compiling expression
leave
KErrNoMemory Memory allocation error
leave
  • Otherwise, any of the system wide errors.

ParameterDescription
aContextNodeThe node relative to which the expression is evaluated.
aResolverNot supported in current API. Reserved for future use.

Returns: Result of evaluation

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.

leave
KXmlEngErrXPathResult Error evaluating expression
leave
KXmlEngErrXPathSyntax Error compiling expression
leave
KErrNoMemory Memory allocation error
leave
  • Otherwise, any of the system wide errors.

ParameterDescription
aContextNodeThe node relative to which the expression is evaluated.
aDependentsAfter the method has returned, contains set of nodes that the expression is dependent on.
aResolverNot supported in current API. Reserved for future use.

Returns: Result of evaluation

ExtendedContext ( )

IMPORT_C void *ExtendedContext()const

Gets extended context data for the expression currently being evaluated.

See also: SetExtendedContext

Returns: Extended context pointer or NULL if not sete

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:

See also: RXmlEngXPathExpression

ParameterDescription
aContextExtended context pointer