XPathEvaluator

A simple XPath evaluator abstraction. It has no knowledge about static and dynamic contexts (other than the optional context item), etc. It also has no knowledge about specific implementations, such as Saxon. Moreover, it has no knowledge about XPath versions.

A simple XPath evaluator abstraction. It has no knowledge about static and dynamic contexts (other than the optional context item), etc. It also has no knowledge about specific implementations, such as Saxon. Moreover, it has no knowledge about XPath versions.

This trait looks a bit like the JAXP XPath interface. Like the XPath interface, this trait does not support the XDM data types that succeeded XPath 1.0. Compared to the JAXP XPath interface this trait is more Scala-esque and type-safe.

Authors

Chris de Vreeze

Companion
object
class Object
trait Matchable
class Any

Type members

Types

The context item type.

The context item type.

type Node

The DOM node type in (DOM) evaluation results.

The DOM node type in (DOM) evaluation results.

XPath expression. Typically (but not necessarily) a "compiled" one.

XPath expression. Typically (but not necessarily) a "compiled" one.

Value members

Abstract methods

def evaluateAsBackingElem(expr: XPathExpression, contextItemOption: Option[ContextItem]): Elem
def evaluateAsBackingElemSeq(expr: XPathExpression, contextItemOption: Option[ContextItem]): IndexedSeq[Elem]
def evaluateAsBigDecimal(expr: XPathExpression, contextItemOption: Option[ContextItem]): BigDecimal
def evaluateAsBoolean(expr: XPathExpression, contextItemOption: Option[ContextItem]): Boolean
def evaluateAsNode(expr: XPathExpression, contextItemOption: Option[ContextItem]): Node
def evaluateAsNodeSeq(expr: XPathExpression, contextItemOption: Option[ContextItem]): IndexedSeq[Node]
def evaluateAsString(expr: XPathExpression, contextItemOption: Option[ContextItem]): String
def makeXPathExpression(xPathString: String): XPathExpression

Creates an XPathExpression from the given expression string. Typically (but not necessarily) "compiles" the XPath string. Make sure to pass only XPath strings for which all needed namespace bindings are known to the XPath evaluator.

Creates an XPathExpression from the given expression string. Typically (but not necessarily) "compiles" the XPath string. Make sure to pass only XPath strings for which all needed namespace bindings are known to the XPath evaluator.