sealed trait XPathElem extends ElemLike[XPathElem]
XPath 3.1 AST. The root of the type hierarchy is XPathElem. It offers the ElemApi query API.
The purpose of this AST is as follows:
- It must represent the syntax tree of a successfully parsed XPath expression
- It is not annotated with more semantic information, like type information that is not included in the XPath expression
- It does not know anything about the context in which it runs, like bound namespaces etc.
- It is rich enough to be able to serialize the AST back to XPath, knowing exactly where to place parentheses, braces, etc.
- It is rich enough to contain operator precedence in the AST itself
- Serialization of the AST to XPath may lead to differences in whitespace (and operator aliases), but other than that the result must be the same
- The AST class hierarchy does not have to use the exact same names as the XPath grammar
Having such an AST of a successfully parsed XPath expression, it must be easy to reliably find used namespace prefixes, for example.
TODO Improve several class names.
- Alphabetic
- By Inheritance
- XPathElem
- ElemLike
- ElemApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
filterElems(p: (XPathElem) ⇒ Boolean): IndexedSeq[XPathElem]
Finds all descendant elements obeying the given predicate.
-
final
def
filterElemsOfType[A <: XPathElem](cls: ClassTag[A])(p: (A) ⇒ Boolean): IndexedSeq[A]
Finds all descendant elements of the given element type obeying the given predicate.
-
final
def
filterElemsOrSelf(p: (XPathElem) ⇒ Boolean): IndexedSeq[XPathElem]
Finds all descendant-or-self elements obeying the given predicate.
-
final
def
filterElemsOrSelfOfType[A <: XPathElem](cls: ClassTag[A])(p: (A) ⇒ Boolean): IndexedSeq[A]
Finds all descendant-or-self elements of the given element type obeying the given predicate.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
findAllElems: IndexedSeq[XPathElem]
Finds all descendant elements.
-
final
def
findAllElemsOfType[A <: XPathElem](cls: ClassTag[A]): IndexedSeq[A]
Finds all descendant elements of the given element type.
-
final
def
findAllElemsOrSelf: IndexedSeq[XPathElem]
Finds all descendant-or-self elements.
-
final
def
findAllElemsOrSelfOfType[A <: XPathElem](cls: ClassTag[A]): IndexedSeq[A]
Finds all descendant-or-self elements of the given element type.
-
final
def
findAllTopmostElemsOfType[A <: XPathElem](cls: ClassTag[A]): IndexedSeq[A]
Finds all topmost descendant elements of the given element type.
-
final
def
findAllTopmostElemsOrSelfOfType[A <: XPathElem](cls: ClassTag[A]): IndexedSeq[A]
Finds all topmost descendant-or-self elements of the given element type.
-
final
def
findElem(p: (XPathElem) ⇒ Boolean): Option[XPathElem]
Finds the first descendant element obeying the given predicate, if any, returning an optional result.
-
final
def
findElemOfType[A <: XPathElem](cls: ClassTag[A])(p: (A) ⇒ Boolean): Option[A]
Finds the first descendant element of the given element type obeying the given predicate, if any, returning an optional result.
-
final
def
findElemOrSelf(p: (XPathElem) ⇒ Boolean): Option[XPathElem]
Finds the first descendant-or-self element obeying the given predicate, if any, returning an optional result.
-
final
def
findElemOrSelfOfType[A <: XPathElem](cls: ClassTag[A])(p: (A) ⇒ Boolean): Option[A]
Finds the first descendant-or-self element of the given element type obeying the given predicate, if any, returning an optional result.
-
final
def
findFirstElemOfType[A <: XPathElem](cls: ClassTag[A]): Option[A]
Finds the first descendant element of the given element type, if any, returning an optional result.
-
final
def
findFirstElemOrSelfOfType[A <: XPathElem](cls: ClassTag[A]): Option[A]
Finds the first descendant-or-self element of the given element type, if any, returning an optional result.
-
final
def
findTopmostElems(p: (XPathElem) ⇒ Boolean): IndexedSeq[XPathElem]
Finds all topmost descendant elements obeying the given predicate.
-
final
def
findTopmostElemsOfType[A <: XPathElem](cls: ClassTag[A])(p: (A) ⇒ Boolean): IndexedSeq[A]
Finds all topmost descendant elements of the given element type obeying the given predicate.
-
final
def
findTopmostElemsOrSelf(p: (XPathElem) ⇒ Boolean): IndexedSeq[XPathElem]
Finds all topmost elements-or-self obeying the given predicate.
-
final
def
findTopmostElemsOrSelfOfType[A <: XPathElem](cls: ClassTag[A])(p: (A) ⇒ Boolean): IndexedSeq[A]
Finds all topmost descendant-or-self elements of the given element type obeying the given predicate.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )