Packages

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)

Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. XPath
  2. DocumentSplitters
  3. SiblingsAxis
  4. AttributeAxis
  5. OtherNodeTypes
  6. ElementStep
  7. Axis
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new XPath(path: XPathInfo, cbf: CanBuildFrom[PT, xml.XmlPath, PT])(implicit helper: BuilderHelper[xml.XmlPath, PT])

Type Members

  1. type T = PT
    Definition Classes
    XPathAxis

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def *: XPath[T]

    all child elements

    all child elements

    Definition Classes
    ElementStep
  4. def *(pos: Int): 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
  5. def *(pred: (xml.XmlPath) ⇒ Boolean): XPath[T]

    Search for all immediate child elements matching the predicate

    Search for all immediate child elements matching the predicate

    Definition Classes
    ElementStep
  6. def *(qname: QName): 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
  7. def *:*(local: String): 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
  8. def *:@(local: String): AttributePaths[T]

    Only matches local name

    Only matches local name

    Definition Classes
    AttributeAxis
  9. def *@(qname: UnprefixedQName): 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
  10. def *@(attrQName: xml.AttributeQName): AttributePaths[T]

    Special case for AttributeQNames, only local and namespace match

    Special case for AttributeQNames, only local and namespace match

    Definition Classes
    AttributeAxis
  11. def *@(pred: (AttributePath) ⇒ Boolean): 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
  12. def *@: AttributePaths[T]

    All immediate attributes

    All immediate attributes

    Definition Classes
    AttributeAxis
  13. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. final def ===(textValue: ⇒ String): XPath[T]

    simple test for string equality

    simple test for string equality

    Definition Classes
    Axis
  15. 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
  16. def \*: XPath[T]
    Definition Classes
    ElementStep
  17. def \*(pos: Int): XPath[T]
    Definition Classes
    ElementStep
  18. def \*(pred: (xml.XmlPath) ⇒ Boolean): XPath[T]
    Definition Classes
    ElementStep
  19. def \*(qname: QName): XPath[T]
    Definition Classes
    ElementStep
  20. def \*:*(local: String): XPath[T]
    Definition Classes
    ElementStep
  21. def \*:@(local: String): AttributePaths[T]
    Definition Classes
    AttributeAxis
  22. 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
  23. def \@(qname: UnprefixedQName): 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
  24. def \@(attrQName: xml.AttributeQName): AttributePaths[T]

    Special case for AttributeQNames, only local and namespace match

    Special case for AttributeQNames, only local and namespace match

    Definition Classes
    AttributeAxis
  25. def \@(pred: (AttributePath) ⇒ Boolean): AttributePaths[T]
    Definition Classes
    AttributeAxis
  26. def \@: AttributePaths[T]
    Definition Classes
    AttributeAxis
  27. def \\: XPath[T]

    All descendants, uses XPathInfo eager to choose an implementation

    All descendants, uses XPathInfo eager to choose an implementation

    Definition Classes
    Axis
  28. def \\*(pos: Int): XPath[T]
    Definition Classes
    ElementStep
  29. def \\*(pred: (xml.XmlPath) ⇒ Boolean): XPath[T]
    Definition Classes
    ElementStep
  30. def \\*(qname: QName): XPath[T]
    Definition Classes
    ElementStep
  31. def \\*: XPath[T]
    Definition Classes
    ElementStep
  32. def \\*:*(local: String): XPath[T]
    Definition Classes
    ElementStep
  33. def \\@(qname: UnprefixedQName): 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
  34. def \\@(attrQName: xml.AttributeQName): AttributePaths[T]

    Special case for AttributeQNames, only local and namespace match

    Special case for AttributeQNames, only local and namespace match

    Definition Classes
    AttributeAxis
  35. def \\@(pred: (AttributePath) ⇒ Boolean): AttributePaths[T]
    Definition Classes
    AttributeAxis
  36. def \\@: AttributePaths[T]
    Definition Classes
    AttributeAxis
  37. def \^: XPath[T]

    Parents of these paths

    Parents of these paths

    Definition Classes
    Axis
  38. def ancestor_::: XPath[T]

    All parents of this node

    All parents of this node

    Definition Classes
    DocumentSplitters
  39. def ancestor_or_self_::: XPath[T]

    All parents of this node or this node

    All parents of this node or this node

    Definition Classes
    DocumentSplitters
  40. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  41. val cbf: CanBuildFrom[PT, xml.XmlPath, PT]
    Definition Classes
    XPathAxis
  42. def cdata: XPath[T]

    all cdata child elements

    all cdata child elements

    Definition Classes
    OtherNodeTypes
  43. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  44. def comment: XPath[T]

    all commnent child elements

    all commnent child elements

    Definition Classes
    OtherNodeTypes
  45. def descendant_::: 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
  46. def descendant_or_self_::: XPath[T]

    All descendants of this node or self

    All descendants of this node or self

    Definition Classes
    DocumentSplitters
  47. def empty: Iterable[xml.XmlPath]
    Definition Classes
    XPathAxis
  48. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  50. final def filter(pred: (xml.XmlPath) ⇒ Boolean): XPath[T]

    filter through the current matches

    filter through the current matches

    Definition Classes
    Axis
  51. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  52. def following_::: 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
  53. def following_sibling_::: XPath[T]

    All siblings after the context

    All siblings after the context

    Definition Classes
    SiblingsAxis
  54. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  55. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  56. implicit val helper: BuilderHelper[xml.XmlPath, PT]
    Definition Classes
    XPathAttributeAxis
  57. def i_*@: Iterable[AttributePath]
    Definition Classes
    AttributeAxis
  58. def in(f: (XPath[T]) ⇒ XPath[T]): XPath[T]

    Allow working within the XPath, easily extend and test

  59. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  60. def just(only: xml.XmlPath): Iterable[xml.XmlPath]
    Definition Classes
    XPathAxis
  61. def last_<(n: ⇒ Int): XPath[T]

    Equivalent to [last() < n]

    Equivalent to [last() < n]

    Definition Classes
    Axis
  62. def last_==(n: ⇒ Int): XPath[T]

    Equivalent to [last() = n]

    Equivalent to [last() = n]

    Definition Classes
    Axis
  63. def last_>(n: ⇒ Int): XPath[T]

    Equivalent to [last() > n]

    Equivalent to [last() > n]

    Definition Classes
    Axis
  64. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  65. def newThis(xpathInfo: XPathInfo): XPath[T]
    Definition Classes
    XPathAxis
  66. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  67. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  68. def one: Iterable[xml.XmlPath]

    Some when its only one in the result set

  69. def oneOr(handler: (XPath[T]) ⇒ Iterable[xml.XmlPath]): Iterable[xml.XmlPath]
  70. val path: XPathInfo
    Definition Classes
    XPathAxis
  71. def pi: XPath[T]

    all pi child elements

    all pi child elements

    Definition Classes
    OtherNodeTypes
  72. 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
  73. def pos_<(pos: ⇒ Int): XPath[T]

    Equivalent to [position() < pos]

    Equivalent to [position() < pos]

    Definition Classes
    Axis
  74. def pos_==(p: ⇒ Int): XPath[T]
    Definition Classes
    Axis
  75. def pos_>(pos: ⇒ Int): XPath[T]

    Equivalent to [position() > pos]

    Equivalent to [position() > pos]

    Definition Classes
    Axis
  76. def pos_eq_last: XPath[T]

    Equivalent to position() = last()

    Equivalent to position() = last()

    Definition Classes
    Axis
  77. def preceding_::: 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
  78. def preceding_sibling_::: XPath[T]

    All siblings before the context

    All siblings before the context

    Definition Classes
    SiblingsAxis
  79. def process(newNodes: Iterable[Iterable[xml.XmlPath]], info: XPathInfo = path): XPath[T]
    Definition Classes
    Axis
  80. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  81. def text: 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
  82. def textOnly: 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
  83. def toString(): String
    Definition Classes
    AnyRef → Any
  84. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  85. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  86. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  87. final def xfilter(f: (Iterable[xml.XmlPath]) ⇒ Boolean): XPath[T]
    Definition Classes
    Axis
  88. 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
  89. final def xlast(onN: (Int) ⇒ Boolean): XPath[T]
    Attributes
    protected
    Definition Classes
    Axis
  90. final def xmap(f: (Iterable[xml.XmlPath]) ⇒ Iterable[xml.XmlPath]): XPath[T]
    Definition Classes
    Axis
  91. 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.

  92. def |>(f: (XPath[T]) ⇒ XPath[T]): XPath[T]

    Allow working within the XPath, easily extend and test

Inherited from DocumentSplitters

Inherited from SiblingsAxis

Inherited from AttributeAxis

Inherited from OtherNodeTypes

Inherited from ElementStep

Inherited from Axis

Inherited from AnyRef

Inherited from Any

Ungrouped