#include <xml/dom/xmlengxpathevaluator.h>
| class TXmlEngXPathEvaluator |
| 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 *) |
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
| 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:
See also: http://en.wikipedia.org/wiki/XPath
Otherwise, any of the system wide errors.
| Parameter | Description |
|---|---|
| aExpression | The expression to create |
| aResolver | Not supported in current API. Reserved for future use. |
Returns: The compiled XPath expression.
| 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.
Otherwise, any of the system wide errors.
| Parameter | Description |
|---|---|
| aExpression | The expression to evaluate |
| aContextNode | The node relative to which the expression is evaluated. |
| aResolver | Not supported in current API. Reserved for future use. |
Returns: The result of the evaluation.
| 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.
Otherwise, any of the system wide errors.
| Parameter | Description |
|---|---|
| aExpression | The expression to evaluate |
| aContextNode | The node relative to which the expression is evaluated. |
| aResolver | Not supported in current API. Reserved for future use. |
| aDependents | After the method has returned, contains set of nodes that the expression is dependent on. |
Returns: The result of evaluation
| IMPORT_C CXmlEngXFormsInstanceMap * | InstanceMap | ( | ) |
Returns the registered instance map. Ownership is not transferred.
Returns: 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.
| Parameter | Description |
|---|---|
| aInstanceTrees | The instance map, ownership is not transferred. |