#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
Parameters | |
---|---|
aExpression | The expression to create |
aResolver | Not supported in current API. Reserved for future use. |
Leave Codes | |
---|---|
KXmlEngErrXPathSyntax | Error compiling expression |
KErrNoMemory | Memory allocation error |
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.
Parameters | |
---|---|
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. |
Leave Codes | |
---|---|
KXmlEngErrXPathResult | Error evaluating expression |
KXmlEngErrXPathSyntax | Error compiling expression |
KErrNoMemory | Memory allocation error |
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.
Parameters | |
---|---|
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. |
Leave Codes | |
---|---|
KXmlEngErrXPathResult | Error evaluating expression |
KXmlEngErrXPathSyntax | Error compiling expression |
KErrNoMemory | Memory allocation error |
IMPORT_C CXmlEngXFormsInstanceMap * | InstanceMap | ( | ) |
Returns the registered instance map. Ownership is not transferred.
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.
Parameters | |
---|---|
aInstanceTrees | The instance map, ownership is not transferred. |