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
Public Member Functions | |
---|---|
TXmlEngXPathEvaluator() | |
IMPORT_C RXmlEngXPathExpression | CreateExpressionL(const TDesC8 &, const MXmlEngNamespaceResolver *) |
IMPORT_C RXmlEngXPathResult | EvaluateL(const TDesC8 &, const TXmlEngNode, const MXmlEngNamespaceResolver *) |
IMPORT_C RXmlEngXPathResult | EvaluateWithDependenciesL(const TDesC8 &, const TXmlEngNode, const MXmlEngNamespaceResolver *, RXmlEngNodeSet &) |
IMPORT_C CXmlEngXFormsInstanceMap * | InstanceMap() |
IMPORT_C void | SetInstanceMap(CXmlEngXFormsInstanceMap *) |
Private Attributes | |
---|---|
CXmlEngXFormsInstanceMap * | iInstanceTrees |
IMPORT_C RXmlEngXPathExpression | CreateExpressionL | ( | 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.
const TDesC8 & aExpression | The expression to create |
const MXmlEngNamespaceResolver * aResolver = NULL | Not supported in current API. Reserved for future use. |
IMPORT_C RXmlEngXPathResult | EvaluateL | ( | const TDesC8 & | aExpression, |
const TXmlEngNode | aContextNode, | |||
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.
const TDesC8 & aExpression | The expression to evaluate |
const TXmlEngNode aContextNode | The node relative to which the expression is evaluated. |
const MXmlEngNamespaceResolver * aResolver = NULL | Not supported in current API. Reserved for future use. |
IMPORT_C RXmlEngXPathResult | EvaluateWithDependenciesL | ( | const TDesC8 & | aExpression, |
const TXmlEngNode | aContextNode, | |||
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.
const TDesC8 & aExpression | The expression to evaluate |
const TXmlEngNode aContextNode | The node relative to which the expression is evaluated. |
const MXmlEngNamespaceResolver * aResolver | Not supported in current API. Reserved for future use. |
RXmlEngNodeSet & aDependents | After the method has returned, contains set of nodes that the expression is dependent on. |
IMPORT_C CXmlEngXFormsInstanceMap * | InstanceMap | ( | ) |
Returns the registered instance map. Ownership is not transferred. A pointer to the instance map or NULL if not registered.
IMPORT_C void | SetInstanceMap | ( | 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.
CXmlEngXFormsInstanceMap * aInstanceTrees | The instance map, ownership is not transferred. |