XML::GDOME::XPath::Evaluator - Interface XPathEvaluator implementation.
$xpeval = XML::GDOME::XPathEvaluator::mkref();
$xpnsresolv = $xpeval->createNSResolver($nodeResolver);
$xpresult = $xpeval->createResult();
$xpresult = $xpeval->evaluate($expression,$contextNode,$resolver,$type,$result);
- $xpeval = XML::GDOME::XPathEvaluator::mkref();
- Constructor of the XPathEvaluator interface.
Returns: the reference to the XPathEvaluator
structure.
- $xpnsresolv = $xpeval->createNSResolver($nodeResolver);
- Adapts any DOM node to resolve namespaces so that an XPath expression can
be easily evaluated relative to the context of the node where it appeared
within the document.
Returns: GdomeXPathNSResolver object.
- $xpresult = $xpeval->createResult();
- Returns: an GdomeXPathResult object which may be passed as a
parameter to the evaluation methods of this GdomeXPathEvaluator so that a
new one is not created on each call to an evaluation method.
- $xpresult =
$xpeval->evaluate($expression,$contextNode,$resolver,$type,$result);
- Evaluates an XPath expression string
"expression": The XPath
expression string to be parsed and evaluated.
"contextNode": Context node for
the evaluation of this XPath expression.
"resolver": The resolver
permits translation of prefixes within the XPath expression into
appropriate namespace URIs.
"type": If specified, result
will be coerced to return the specified type.
"result": Specifies a
GdomeXPathResult object to be re-used.
Returns: a result of the specified type if
possible.