xpathEvaluate method

  1. @experimental
XPathValue xpathEvaluate(
  1. String expression, {
  2. Map<String, XPathValue> variables = const {},
  3. Map<String, XPathFunction> functions = const {},
})

Returns the value resulting from evaluating the given XPath expression.

The returned value is of type XPathNodeSet, XPathString, XPathNumber, or XPathBoolean. You can fetch the underlying data by calling XPathValue.nodes, XPathValue.string, XPathValue.number, or XPathValue.boolean respectively.

Implementation

@experimental
XPathValue xpathEvaluate(String expression,
        {Map<String, XPathValue> variables = const {},
        Map<String, XPathFunction> functions = const {}}) =>
    _cache[expression](
        XPathContext(this, variables: variables, functions: functions));