scala.xml

class Elem

[source: scala/xml/Elem.scala]

@serializable

class Elem(val override prefix : String, val label : String, val override attributes : MetaData, val override scope : NamespaceBinding, val child : Node*)
extends Node
The case class Elem extends the Node class, providing an immutable data object representing an XML element.
Author
Burak Emir
Parameters
prefix - (may be null)
label - the element name
attribute - the attribute map
child - the children of this node
Method Summary
final def % (attrs : MetaData) : Elem
Returns a new element with updated attributes.
override def hashCode : Int
Returns a hashcode. A standard implementation of hashcodes is obtained by calling Utility.hashCode(pre, label, attributes.hashCode(), child); Martin to Burak: to do: if you make this method abstract, the compiler will now complain if there's no implementation in a subclass. Is this what we want? Note that this would break doc/DocGenator and doc/ModelToXML, with an error message like: doc/ModelToXML.scala:95: error: object creation impossible, since there is a deferred declaration of method hashCode in class Node of type ()Int which is not implemented in a subclass new SpecialNode {
override def text : String
Returns concatenation of text(n) for each child n.
Methods inherited from Node
namespace, getNamespace, attribute, attribute, descendant, descendant_or_self, equals, theSeq, toString, toString, nameToString, xmlType
Methods inherited from NodeSeq
length, elements, apply, apply, \, \\
Methods inherited from Seq
size, isEmpty, concat, ++, isDefinedAt, lastIndexOf, map, flatMap, filter, take, drop, takeWhile, dropWhile, reverse, contains, slice, subseq, toArray
Methods inherited from Collection
stringPrefix
Methods inherited from Iterable
foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, addString, addString, copyToArray, projection, hasDefiniteSize
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override def hashCode : Int
Returns a hashcode. A standard implementation of hashcodes is obtained by calling Utility.hashCode(pre, label, attributes.hashCode(), child); Martin to Burak: to do: if you make this method abstract, the compiler will now complain if there's no implementation in a subclass. Is this what we want? Note that this would break doc/DocGenator and doc/ModelToXML, with an error message like: doc/ModelToXML.scala:95: error: object creation impossible, since there is a deferred declaration of method hashCode in class Node of type ()Int which is not implemented in a subclass new SpecialNode {
Overrides Node.hashCode
final def %(attrs : MetaData) : Elem
Returns a new element with updated attributes.
Parameters
attrs - ...
Returns
a new symbol with updated attributes

override def text : String
Returns concatenation of text(n) for each child n.
Overrides Node.text