TXmlEngXPathEvaluator Class Reference

class TXmlEngXPathEvaluator

Evaluates XPath expressions on a DOM tree.

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

Constructor & Destructor Documentation

TXmlEngXPathEvaluator()

IMPORT_CTXmlEngXPathEvaluator()

Default constructor

Member Functions Documentation

CreateExpressionL(const TDesC8 &, const MXmlEngNamespaceResolver *)

IMPORT_C RXmlEngXPathExpressionCreateExpressionL(const TDesC8 &aExpression,
const MXmlEngNamespaceResolver *aResolver = NULL
)

Precompiles and stores an XPath expression, which is returned to caller.

Information on how to write XPath expressions can be found here: http://en.wikipedia.org/wiki/XPath

The compiled XPath expression.

leave

KXmlEngErrXPathSyntax Error compiling expression

leave

KErrNoMemory Memory allocation error

leave

  • Otherwise, any of the system wide errors.

Parameters

const TDesC8 & aExpressionThe expression to create
const MXmlEngNamespaceResolver * aResolver = NULLNot supported in current API. Reserved for future use.

EvaluateL(const TDesC8 &, const TXmlEngNode, const MXmlEngNamespaceResolver *)

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

Evaluates the XPath expression given as a parameter and returns the result.

The result of the 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

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

EvaluateWithDependenciesL(const TDesC8 &, const TXmlEngNode, const MXmlEngNamespaceResolver *, RXmlEngNodeSet &)

IMPORT_C RXmlEngXPathResultEvaluateWithDependenciesL(const TDesC8 &aExpression,
const TXmlEngNodeaContextNode,
const MXmlEngNamespaceResolver *aResolver,
RXmlEngNodeSet &aDependents
)

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

The 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

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

InstanceMap()

IMPORT_C CXmlEngXFormsInstanceMap *InstanceMap()

Returns the registered instance map. Ownership is not transferred. A pointer to the instance map or NULL if not registered.

SetInstanceMap(CXmlEngXFormsInstanceMap *)

IMPORT_C voidSetInstanceMap(CXmlEngXFormsInstanceMap *aInstanceTrees)

Registers the instance map to be used when evaluating form expressions. The map contains DOM Documents and their names. For example, when evaluating the expression "instance('a')" the evaluator looks up a document that has the name "a" from the map.

Parameters

CXmlEngXFormsInstanceMap * aInstanceTreesThe instance map, ownership is not transferred.

Member Data Documentation

CXmlEngXFormsInstanceMap * iInstanceTrees

CXmlEngXFormsInstanceMap *iInstanceTrees[private]