in scala/xml
trait Node

trait Node()
extends NodeSeq
with ScalaObject
Implementing classes or objects:
class Elem(namespace$$: String, label$$: String, attributes: AttributeSeq, child: Node*)
class SpecialNode()

Trait for representing XML using nodes of a labelled tree. This trait contains an implementation of a subset of XPath for navigation.

Method Summary
final def attribute: Map[String,String]
     attribute map for attributes with the same namespace as this element
abstract def attributes: AttributeSeq
     attribute axis - all attributes of this node, in order defined by attrib
abstract def child: Seq[Node]
     child axis (all children of this node)
  def descendant: List[Node]
     descendant axis (all descendants of this node)
  def descendant_or_self: List[Node]
     descendant axis (all descendants of this node)
override def equals(x: Any): Boolean
     structural equality
override def hashCode(): Int
     projection function.
abstract def label: String
     QName (the label of this node).
abstract def namespace: String
     the namespace of this node
final def theSeq: List[Node]
override def toString(): String
     string representation of this node

Methods inherited from java/lang/Object-class
clone, eq, finalize, getClass, notify, notifyAll, synchronized, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/Iterable-class
/:, :\, exists, find, foldLeft, foldRight, forall, foreach, sameElements

Methods inherited from scala/Seq-class
copyToArray, drop, indexOf, isDefinedAt, lastIndexOf, stringPrefix, subseq, take, toList

Methods inherited from scala/xml/NodeSeq-class
\, \\, apply, asList, elements, filter, flatMap, length, map

Method Detail

theSeq

  final def theSeq: List[Node]

label

  abstract def label: String
QName (the label of this node). I.e. "foo" for <foo/>)

namespace

  abstract def namespace: String
the namespace of this node

attribute

  final def attribute: Map[String,String]
attribute map for attributes with the same namespace as this element

attributes

  abstract def attributes: AttributeSeq
attribute axis - all attributes of this node, in order defined by attrib

child

  abstract def child: Seq[Node]
child axis (all children of this node)

descendant

  def descendant: List[Node]
descendant axis (all descendants of this node)

descendant_or_self

  def descendant_or_self: List[Node]
descendant axis (all descendants of this node)

equals

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

hashCode

  override def hashCode(): Int
projection function. Similar to XPath, use this \\ 'foo to filter all nodes labelled with "foo" from the descendant_or_self axis. The document order is preserved. def \\( that:String ): NodeSeq = { val z = this.descendant_or_self; new NodeSeq( that match { case "_" => z case _ => z.filter( x => x.label == that ); }) }

toString

  override def toString(): String
string representation of this node