Class/Object

com.lucidchart.open.xtract

XPath

Related Docs: object XPath | package xtract

Permalink

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
Serializable, Serializable, Product, Equals, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. XPath
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++(other: XPath): XPath

    Permalink

    Concatenate two XPaths together

  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def \(child: String): XPath

    Permalink

    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 \@(attribute: String): XPath

    Permalink

    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

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

    Permalink

    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.

  8. def apply(xml: NodeSeq): NodeSeq

    Permalink

    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.

  9. def apply(attr: String): XPath

    Permalink

    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.

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

    Permalink

    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.

  11. def apply(idx: Int): XPath

    Permalink

    Equivalent of "[idx]" in xpath syntax.

    Equivalent of "[idx]" in xpath syntax.

    idx

    The index of the node to select.

    returns

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

  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def children: XPath

    Permalink

    Equivalent of "/ *" in xpath syntax.

    Equivalent of "/ *" in xpath syntax.

    returns

    a new XPath that selects all children of the current selection

  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def lazyRead[A](r: ⇒ XmlReader[A]): XmlReader[A]

    Permalink

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

  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. val path: List[XPathNode]

    Permalink

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

  24. def read[A](implicit reader: XmlReader[A]): XmlReader[A]

    Permalink

    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

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

    Permalink

    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

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    XPath → AnyRef → Any
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def with_attr(name: String, value: String): XPath

    Permalink

    Equivalent to with_attr(name, Some(value))

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

    Permalink

    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.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped