scala.xml

class NodeSeq

[source: scala/xml/NodeSeq.scala]

abstract class NodeSeq
extends Seq[Node]
This class implements a wrapper around Seq[Node] that adds XPath and comprehension methods.
Author
Burak Emir
Version
1.0
Direct Known Subclasses:
Document, Node

Method Summary
def \ (that : java.lang.String) : NodeSeq
Projection function. Similar to XPath, use this \ "foo" to get a list of all elements of this sequence that are labelled with "foo". Use \ "_" as a wildcard. Use ns \ "@foo" to get the unprefixed attribute "foo". Use ns \ "@{uri}foo" to get the prefixed attribute "pre:foo" whose prefix "pre" is resolved to the namespace "uri". For attribute projections, the resulting NodeSeq attribute values are wrapped in a Group. There is no support for searching a prefixed attribute by its literal prefix. The document order is preserved.
def \\ (that : java.lang.String) : NodeSeq
projection function. Similar to XPath, use this \\ 'foo to get a list of all elements of this sequence that are labelled with "foo". Use \\ "_" as a wildcard. Use ns \\ "@foo" to get the unprefixed attribute "foo". Use ns \\ "@{uri}foo" to get each prefixed attribute "pre:foo" whose prefix "pre" is resolved to the namespace "uri". For attribute projections, the resulting NodeSeq attribute values are wrapped in a Group. There is no support for searching a prefixed attribute by its literal prefix. The document order is preserved.
def apply (f : (Node) => Boolean) : NodeSeq
def apply (i : Int) : Node
override def elements : Iterator[Node]
Creates a new iterator over all elements contained in this object.
override def equals (x : Any) : Boolean
structural equality
def length : Int
Returns the length of the sequence.
def text : java.lang.String
abstract def theSeq : Seq[Node]
override def toString : java.lang.String
Returns a string representation of the object.
Methods inherited from Seq
lengthCompare, size, isEmpty, concat, last, lastOption, first, firstOption, headOption, ++, isDefinedAt, lastIndexOf, findIndexOf, indexOf, map, flatMap, filter, take, drop, slice, slice, takeWhile, dropWhile, reverse, contains, subseq, toArray, toSeq, projection, equalsWith, startsWith, startsWith, endsWith, indexOf, containsSlice
Methods inherited from Collection
stringPrefix
Methods inherited from Iterable
partition, foreach, forall, exists, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, hasDefiniteSize
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from AnyRef
getClass, hashCode, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
abstract def theSeq : Seq[Node]

def length : Int
Returns the length of the sequence.
Returns
the sequence length.
Overrides
Seq.length

override def elements : Iterator[Node]
Creates a new iterator over all elements contained in this object.
Returns
the new iterator

def apply(i : Int) : Node

def apply(f : (Node) => Boolean) : NodeSeq

override def equals(x : Any) : Boolean
structural equality

def \(that : java.lang.String) : NodeSeq
Projection function. Similar to XPath, use this \ "foo" to get a list of all elements of this sequence that are labelled with "foo". Use \ "_" as a wildcard. Use ns \ "@foo" to get the unprefixed attribute "foo". Use ns \ "@{uri}foo" to get the prefixed attribute "pre:foo" whose prefix "pre" is resolved to the namespace "uri". For attribute projections, the resulting NodeSeq attribute values are wrapped in a Group. There is no support for searching a prefixed attribute by its literal prefix. The document order is preserved.
Parameters
that - ...
Returns
...

def \\(that : java.lang.String) : NodeSeq
projection function. Similar to XPath, use this \\ 'foo to get a list of all elements of this sequence that are labelled with "foo". Use \\ "_" as a wildcard. Use ns \\ "@foo" to get the unprefixed attribute "foo". Use ns \\ "@{uri}foo" to get each prefixed attribute "pre:foo" whose prefix "pre" is resolved to the namespace "uri". For attribute projections, the resulting NodeSeq attribute values are wrapped in a Group. There is no support for searching a prefixed attribute by its literal prefix. The document order is preserved.
Parameters
that - ...
Returns
...

override def toString : java.lang.String
Returns a string representation of the object.

The default representation is platform dependent.

Returns
a string representation of the object.


def text : java.lang.String