class XPath[PT <: Iterable[xml.XmlPath]] extends ElementStep with OtherNodeTypes with AttributeAxis with SiblingsAxis with DocumentSplitters
In contrast to the specs reverse axis are not supported. This puts an extra effort on the user for translating, but I don't agree with the design anyway. It adds both ambiguity for an embedded dsl:
//a:ShouldRedeclare/../text()[5]/preceding-sibling::text()[1]
is in reverse order (above is previousSibling in Path), whereas
(//a:ShouldRedeclare/../text()[5]/preceding-sibling::text())[1]
is in doc order (the first text child of the parent). Such an arbritary decision does nothing but irritate. A simpler design as found in this implementation is that the user can simply use full scala data functions to reverse as needed.
(Temptation is to provide the base type as SeqLike instead of Iterable as it should be in a sequence with a defined order, also then providing .reverse and friends)
- Alphabetic
- By Inheritance
- XPath
- DocumentSplitters
- SiblingsAxis
- AttributeAxis
- OtherNodeTypes
- ElementStep
- Axis
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new XPath(path: XPathInfo, cbf: CanBuildFrom[PT, xml.XmlPath, PT])(implicit helper: BuilderHelper[xml.XmlPath, PT])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def *: xml.XPath[T]
all child elements
all child elements
- Definition Classes
- ElementStep
- def *(pos: Int): xml.XPath[T]
Immediate child with position pos, should only be an element.
Immediate child with position pos, should only be an element. NOTE this will always be evaluated in place and is 1 indexed
- Definition Classes
- ElementStep
- def *(pred: (xml.XmlPath) => Boolean): xml.XPath[T]
Search for all immediate child elements matching the predicate
Search for all immediate child elements matching the predicate
- Definition Classes
- ElementStep
- def *(qname: QName): xml.XPath[T]
Search for all immediate child elements with a matching qname
Search for all immediate child elements with a matching qname
- Definition Classes
- ElementStep
- def *:*(local: String): xml.XPath[T]
Search for all immediate child elements with a matching local name only
Search for all immediate child elements with a matching local name only
- Definition Classes
- ElementStep
- def *:@(local: String): xml.AttributePaths[T]
Only matches local name
Only matches local name
- Definition Classes
- AttributeAxis
- def *@(qname: UnprefixedQName): xml.AttributePaths[T]
Loose match for UnprefixedQNames only, only matches local and namespace
Loose match for UnprefixedQNames only, only matches local and namespace
- Definition Classes
- AttributeAxis
- def *@(attrQName: xml.AttributeQName): xml.AttributePaths[T]
Special case for AttributeQNames, only local and namespace match
Special case for AttributeQNames, only local and namespace match
- Definition Classes
- AttributeAxis
- def *@(pred: (xml.AttributePath) => Boolean): xml.AttributePaths[T]
Search for all immediate attributes with a matching predicate (allows localName only searches for example)
Search for all immediate attributes with a matching predicate (allows localName only searches for example)
- Definition Classes
- AttributeAxis
- def *@: xml.AttributePaths[T]
All immediate attributes
All immediate attributes
- Definition Classes
- AttributeAxis
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ===(textValue: => String): XPath[T]
simple test for string equality
simple test for string equality
- Definition Classes
- Axis
- def \: XPath[T]
simply forwards the current context, element\item specific versions exist that step downwards in document order
simply forwards the current context, element\item specific versions exist that step downwards in document order
- Definition Classes
- Axis
- def \*: xml.XPath[T]
- Definition Classes
- ElementStep
- def \*(pos: Int): xml.XPath[T]
- Definition Classes
- ElementStep
- def \*(pred: (xml.XmlPath) => Boolean): xml.XPath[T]
- Definition Classes
- ElementStep
- def \*(qname: QName): xml.XPath[T]
- Definition Classes
- ElementStep
- def \*:*(local: String): xml.XPath[T]
- Definition Classes
- ElementStep
- def \*:@(local: String): AttributePaths[T]
- Definition Classes
- AttributeAxis
- def \+: XPath[T]
all children unpacked, normal xpath requires the context in E1/E2, which hugely complicates things, so \ is this, \+ is \ in the case where unpacking is needed which just leaves \* varieties for elements.
all children unpacked, normal xpath requires the context in E1/E2, which hugely complicates things, so \ is this, \+ is \ in the case where unpacking is needed which just leaves \* varieties for elements.
- Definition Classes
- Axis
- def \@(qname: UnprefixedQName): xml.AttributePaths[T]
Loose match for UnprefixedQNames only, only matches local and namespace
Loose match for UnprefixedQNames only, only matches local and namespace
- Definition Classes
- AttributeAxis
- def \@(attrQName: xml.AttributeQName): xml.AttributePaths[T]
Special case for AttributeQNames, only local and namespace match
Special case for AttributeQNames, only local and namespace match
- Definition Classes
- AttributeAxis
- def \@(pred: (xml.AttributePath) => Boolean): xml.AttributePaths[T]
- Definition Classes
- AttributeAxis
- def \@: AttributePaths[T]
- Definition Classes
- AttributeAxis
- def \\: XPath[T]
All descendants, uses XPathInfo eager to choose an implementation
All descendants, uses XPathInfo eager to choose an implementation
- Definition Classes
- Axis
- def \\*(pos: Int): XPath[T]
- Definition Classes
- ElementStep
- def \\*(pred: (xml.XmlPath) => Boolean): XPath[T]
- Definition Classes
- ElementStep
- def \\*(qname: QName): XPath[T]
- Definition Classes
- ElementStep
- def \\*: xml.XPath[T]
- Definition Classes
- ElementStep
- def \\*:*(local: String): XPath[T]
- Definition Classes
- ElementStep
- def \\@(qname: UnprefixedQName): xml.AttributePaths[T]
Loose match for UnprefixedQNames only, only matches local and namespace
Loose match for UnprefixedQNames only, only matches local and namespace
- Definition Classes
- AttributeAxis
- def \\@(attrQName: xml.AttributeQName): xml.AttributePaths[T]
Special case for AttributeQNames, only local and namespace match
Special case for AttributeQNames, only local and namespace match
- Definition Classes
- AttributeAxis
- def \\@(pred: (xml.AttributePath) => Boolean): xml.AttributePaths[T]
- Definition Classes
- AttributeAxis
- def \\@: AttributePaths[T]
- Definition Classes
- AttributeAxis
- def \^: XPath[T]
Parents of these paths
Parents of these paths
- Definition Classes
- Axis
- def ancestor_::: xml.XPath[T]
All parents of this node
All parents of this node
- Definition Classes
- DocumentSplitters
- def ancestor_or_self_::: xml.XPath[T]
All parents of this node or this node
All parents of this node or this node
- Definition Classes
- DocumentSplitters
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val cbf: CanBuildFrom[PT, xml.XmlPath, PT]
- def cdata: xml.XPath[T]
all cdata child elements
all cdata child elements
- Definition Classes
- OtherNodeTypes
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def comment: xml.XPath[T]
all commnent child elements
all commnent child elements
- Definition Classes
- OtherNodeTypes
- def descendant_::: xml.XPath[T]
As per spec all children of a context but predicates work directly on these children.
As per spec all children of a context but predicates work directly on these children. i.e. path.\.descendant_::.*(pred).*(1) returns the first elem for which pred is true whereas path.\\*(pred).*(1) returns ALL the first elems for which this is true.
- Definition Classes
- DocumentSplitters
- def descendant_or_self_::: xml.XPath[T]
All descendants of this node or self
All descendants of this node or self
- Definition Classes
- DocumentSplitters
- def empty: Iterable[xml.XmlPath]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def filter(pred: (xml.XmlPath) => Boolean): XPath[T]
filter through the current matches
filter through the current matches
- Definition Classes
- Axis
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def following_::: xml.XPath[T]
All nodes following this given node, in document order, excluding descendants
All nodes following this given node, in document order, excluding descendants
- Definition Classes
- DocumentSplitters
- def following_sibling_::: xml.XPath[T]
All siblings after the context
All siblings after the context
- Definition Classes
- SiblingsAxis
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- implicit val helper: BuilderHelper[xml.XmlPath, PT]
- Definition Classes
- XPath → AttributeAxis
- def i_*@: Iterable[xml.AttributePath]
- Definition Classes
- AttributeAxis
- def in(f: (XPath[T]) => XPath[T]): XPath[T]
Allow working within the XPath, easily extend and test
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def just(only: xml.XmlPath): Iterable[xml.XmlPath]
- def last_<(n: => Int): XPath[T]
Equivalent to [last() < n]
Equivalent to [last() < n]
- Definition Classes
- Axis
- def last_==(n: => Int): XPath[T]
Equivalent to [last() = n]
Equivalent to [last() = n]
- Definition Classes
- Axis
- def last_>(n: => Int): XPath[T]
Equivalent to [last() > n]
Equivalent to [last() > n]
- Definition Classes
- Axis
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newThis(xpathInfo: XPathInfo): XPath[T]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def one: Iterable[xml.XmlPath]
Some when its only one in the result set
- def oneOr(handler: (XPath[T]) => Iterable[xml.XmlPath]): Iterable[xml.XmlPath]
- val path: XPathInfo
- def pi: xml.XPath[T]
all pi child elements
all pi child elements
- Definition Classes
- OtherNodeTypes
- def pos(pos: => Int): XPath[T]
1 index based, per spec, but unsure if it should be
1 index based, per spec, but unsure if it should be
- Definition Classes
- Axis
- def pos_<(pos: => Int): XPath[T]
Equivalent to [position() < pos]
Equivalent to [position() < pos]
- Definition Classes
- Axis
- def pos_==(p: => Int): XPath[T]
- Definition Classes
- Axis
- def pos_>(pos: => Int): XPath[T]
Equivalent to [position() > pos]
Equivalent to [position() > pos]
- Definition Classes
- Axis
- def pos_eq_last: XPath[T]
Equivalent to position() = last()
Equivalent to position() = last()
- Definition Classes
- Axis
- def preceding_::: xml.XPath[T]
All nodes preceding this given context, in reverse document order, excluding parents
All nodes preceding this given context, in reverse document order, excluding parents
- Definition Classes
- DocumentSplitters
- def preceding_sibling_::: xml.XPath[T]
All siblings before the context
All siblings before the context
- Definition Classes
- SiblingsAxis
- def process(newNodes: Iterable[Iterable[xml.XmlPath]], info: XPathInfo = path): XPath[T]
- Definition Classes
- Axis
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def text: xml.XPath[T]
all text child elements - xpath standard way, including cdata nodes, filtered to join adjacent text nodes
all text child elements - xpath standard way, including cdata nodes, filtered to join adjacent text nodes
- Definition Classes
- OtherNodeTypes
- def textOnly: xml.XPath[T]
all text child elements - not including cdata nodes, neither sorted nor dup filtered
all text child elements - not including cdata nodes, neither sorted nor dup filtered
- Definition Classes
- OtherNodeTypes
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def xfilter(f: (Iterable[xml.XmlPath]) => Boolean): XPath[T]
- Definition Classes
- Axis
- final def xflatMap(f: (Iterable[xml.XmlPath]) => Iterable[Iterable[xml.XmlPath]]): XPath[T]
x prefixed to avoid disturbing the use of an xpath as an iterable
x prefixed to avoid disturbing the use of an xpath as an iterable
- Definition Classes
- Axis
- final def xlast(onN: (Int) => Boolean): XPath[T]
- Attributes
- protected
- Definition Classes
- Axis
- final def xmap(f: (Iterable[xml.XmlPath]) => Iterable[xml.XmlPath]): XPath[T]
- Definition Classes
- Axis
- def |(other: XPath[T]): XPath[T]
Union of the two paths, they must use the same type however
Union of the two paths, they must use the same type however
x | x === x but only when apply fromXPathToIterable (default behaviour anyway)
For attribute paths only ++ on an iterable is supported.
- def |>(f: (XPath[T]) => XPath[T]): XPath[T]
Allow working within the XPath, easily extend and test