Scala 2

API Specification
This document is the API specification for Scala 2.


Class Summary
class Atom [ A ]
an XML node for text (PCDATA). Used in both non-bound and bound XML representations
case class Comment
an XML node for comments.
class Document
A document information item (according to InfoSet spec). The comments are copied from the Infoset spec, only augmented with some information on the Scala types for definitions that might have no value.
case class Elem
The case class Elem extends the Node class, providing an immutable data object representing an XML element.
case class EntityRef
an XML node for entity references
case class MalformedAttributeException

abstract class MetaData
Attribute information item, and linked list of attribute information items. These are triples consisting of prefix,key,value. To obtain the namespace, getNamespace must be called with the parent. If next is null, this is the last attribute in the MetaData list. either an UnprefixedAttribute or a PrefixedAttribute
class Molecule [ A ]
an XML node for a list of data items.
class NamespaceBinding
The class NamespaceBinding represents namespace bindings and scopes. The binding for the default namespace is treated as a null prefix. the absent namespace is represented with the null uri. Neither prefix nor uri may be empty, which is not checked.
abstract class Node
An abstract class representing XML with nodes of a labelled tree. This class contains an implementation of a subset of XPath for navigation.
class NodeBuffer
This class acts as a Buffer for nodes. If it is used as a sequence of nodes Seq[Node], it must be ensured that no updates occur after that point, because scala.xml.Node is assumed to be immutable. Despite this being a sequence, don't use it as key in a hashtable. Calling the hashcode function will result in a runtime error.
abstract class NodeSeq
a wrapper around Seq[Node] that adds XPath and comprehension methods
abstract class NodeTraverser

class PrefixedAttribute
prefixed attributes always have a non-null namespace
class PrettyPrinter
Class for pretty printing. After instantiating, you can use the toPrettyXML methods to convert XML to a formatted string. The class can be reused to pretty print any number of XML nodes.
case class ProcInstr
an XML node for processing instructions (PI)
abstract class SpecialNode
a special XML node is either text (PCDATA), a comment, a PI, or an entity ref
case class Text
an XML node for text (PCDATA). Used in both non-bound and bound XML representations
class TextBuffer
this classes is for creating text nodes without surplus whitespace. all occurrences of one or more whitespace in strings appended with the append method will be replaced by a single space character, and leading and trailing space will be removed completely.
abstract class TypeSymbol

class UnprefixedAttribute
unprefixed attributes have the null namespace

Object Summary
object Node
This object provides methods
object NodeSeq

case object Null

object Parsing
DEPRECATED - use either parsing.TokenTests, or Utilty (helper functions for parsing XML fragments ).
object TextBuffer

case object TopScope
top level namespace scope. only contains the predefined binding for the "xml" prefix which is bound to "http://www.w3.org/XML/1998/namespace"
object Utility
Utility functions for processing instances of bound and not bound XML classes, as well as escaping text nodes
object XML
constants, and functions to load and save XML elements. use this when data binding is not desired, i.e. when XML is handled using Symbol nodes