case class XPath(path: List[XPathNode] = Nil) extends Product with Serializable

Class representing an xpath. It can be applied to a NodeSeq to get a NodeSeq located at that path.

path

A sequence of XPathNodes to recursively walk down the XML tree to the location of the path.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. XPath
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new XPath(path: List[XPathNode] = Nil)

    path

    A sequence of XPathNodes to recursively walk down the XML tree to the location of the path.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ++(other: XPath): XPath

    Concatenate two XPaths together

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def \(child: String): XPath

    Equivalent of "/child" in xpath syntax.

    Equivalent of "/child" in xpath syntax.

    child

    The name of the label of the child(ren).

    returns

    a new XPath pointing to all children of this XPath with the given tag label.

  6. def \?(regex: Regex): XPath

    A regex that matches all nodes that contain the string.

    A regex that matches all nodes that contain the string.

    regex

    The regex for the label of the child(ren).

    returns

    a new XPath pointing to all children of this XPath with the given tag label.

  7. def \@(attribute: String): XPath

    Equivalent of "@attribute" in xpath.

    Equivalent of "@attribute" in xpath.

    attribute

    The name of the attribute to select

    returns

    a new XPath that selects the attribute node with the given name

  8. def \\(child: String): XPath

    Equivalent of "//child" in xpath.

    Equivalent of "//child" in xpath.

    child

    The name of the label of the descendents.

    returns

    a new XPath that selects all descendents with the given tag label.

  9. def \\?(regex: Regex): XPath

    A regex that matches recursively all nodes that contain the string.

    A regex that matches recursively all nodes that contain the string.

    regex

    The regex for the label of the child(ren).

    returns

    a new XPath pointing to all children of this XPath with the given tag label.

  10. def apply(xml: NodeSeq): NodeSeq

    Apply this xpath to a NodeSeq.

    Apply this xpath to a NodeSeq.

    xml

    The NodeSeq to apply the path to.

    returns

    the NodeSeq of the node(s) selected by this xpath.

  11. def apply(attr: String): XPath

    Equivalent of "[@attribute]" in xpath syntax.

    Equivalent of "[@attribute]" in xpath syntax.

    attr

    The name of the attribute to filter by

    returns

    a new XPath that selects only nodes which have the given attribute.

  12. def apply(attr: String, value: String): XPath

    Equivalent of "[@attribute=value]" in xpath syntax.

    Equivalent of "[@attribute=value]" in xpath syntax.

    attr

    The name of the attribute to filter by

    value

    The value of the attribute to filter by

    returns

    a new XPath that selects only nodes which have the given value for the given attribute.

  13. def apply(idx: Int): XPath

    Equivalent of "[idx+1]" in xpath syntax, so the first node in this implementation has the index 0.

    Equivalent of "[idx+1]" in xpath syntax, so the first node in this implementation has the index 0. Note that, according to the W3C specification, in xpath the index of the first child node is 1 and not 0.

    idx

    The index of the node to select.

    returns

    a new XPath that selects the node at index idx in the current selection.

  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. def children: XPath

    Equivalent of "/ *" in xpath syntax.

    Equivalent of "/ *" in xpath syntax.

    returns

    a new XPath that selects all children of the current selection

  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def lazyRead[A](r: => XmlReader[A]): XmlReader[A]

    The same as read but take the reader as a lazy argument so that it can be used in recursive definitions.

  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. val path: List[XPathNode]
  25. def productElementNames: Iterator[String]
    Definition Classes
    Product
  26. def read[A](implicit reader: XmlReader[A]): XmlReader[A]

    Create an XmlReader that reads the node(s) located at this xpath.

    Create an XmlReader that reads the node(s) located at this xpath.

    reader

    The reader to use on the node at this path

  27. def readAttribute[A](name: String)(implicit reader: XmlReader[A]): XmlReader[A]

    Create an XmlReader that reads an attribute at the current path.

    Create an XmlReader that reads an attribute at the current path.

    name

    the name of the attribute to read

    reader

    The XmlReader to read the attribute with

  28. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    XPath → AnyRef → Any
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. def with_attr(name: String, value: String): XPath

    Equivalent to with_attr(name, Some(value))

  34. def with_attr(name: String, value: Option[String] = None): XPath

    Equivalent of "[@attribute]" or "[@attribute=value]" in xpath syntax

    Equivalent of "[@attribute]" or "[@attribute=value]" in xpath syntax

    name

    The name of the attribute to filter by

    value

    If supplied filter to only nodes which have this value for the named attribute

    returns

    a new XPath that selects only nodes which have an attribute with the given name, and optionally the supplied value.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped