scala.xml
class Atom

[source: `scala/xml/Atom.scala`]

@serializable
`` `class` Atom[+A](`val` data : A)
  `extends` SpecialNode

  The class `Atom` provides an XML node for text (PCDATA). It is used in both non-bound and bound XML representations.

Author
  Burak Emir
Parameters
  `text -` the text contained in this node, may not be `null`.

Direct Known Subclasses:
  Text, Unparsed

Method Summary
`override def` | equals (x : Any) : Boolean Returns true if x is structurally equal to this node. Compares prefix, label, attributes and children.
`override def` | hashCode : Int hashcode for this Text
`def` | label : String the constant "#PCDATA"
`override def` | text : String Returns a text representation of this node. Note that this is not equivalent to the XPath node-test called text(), it is rather an implementation of the XPath function string() 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\DocGenerator.scala:1219: error: object creation impossible, since there is a deferred declaration of method text in class Node of type => String which is not implemented in a subclass new SpecialNode { ^
`def` | toString (sb : StringBuilder) : StringBuilder Returns text, with some characters escaped according to the XML specification.

Methods inherited from SpecialNode
attributes, namespace, child

Methods inherited from Node
prefix, scope, getNamespace, attribute, attribute, descendant, descendant_or_self, 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

`` `def` label : String

  the constant "#PCDATA"

`override` `def` equals(x : Any) : Boolean

  Returns true if x is structurally equal to this node. Compares prefix, label, attributes and children.

Parameters
  `x -` ...
Returns
  `true` if ..

`override` `def` hashCode : Int

  hashcode for this Text

`` `def` toString(sb : StringBuilder) : StringBuilder

  Returns text, with some characters escaped according to the XML specification.

Parameters
  `sb -` ...
Returns
  ...

Overrides SpecialNode.toString

`override` `def` text : String

  Returns a text representation of this node. Note that this is not equivalent to the XPath node-test called text(), it is rather an implementation of the XPath function string() 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\DocGenerator.scala:1219: error: object creation impossible, since there is a deferred declaration of method text in class Node of type => String which is not implemented in a subclass new SpecialNode { ^