Atom
The class Atom
provides an XML node for text (PCDATA
). It is used in both non-bound and bound XML representations.
Value parameters
- data
-
the text contained in this node, may not be
'''null'''
.
Attributes
- Graph
-
- Supertypes
-
class SpecialNodeclass Nodeclass NodeSeqtrait Serializabletrait Equalityclass AbstractSeq[Node]trait Equalsclass AbstractIterable[Node]trait IterableOnce[Node]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Members list
Value members
Concrete methods
Returns text, with some characters escaped according to the XML specification.
Returns text, with some characters escaped according to the XML specification.
Attributes
- Definition Classes
The logic formerly found in typeTag$, as best I could infer it.
Attributes
- Definition Classes
label of this node. I.e. "foo" for <foo/>)
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:
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 {
^
Attributes
- Definition Classes
Inherited methods
Attributes
- Inherited from:
- ScalaVersionSpecificNodeSeq (hidden)
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- SeqOps
Projection function, which returns elements of this
sequence based on the string that
. Use:
Projection function, which returns elements of this
sequence based on the string that
. Use:
this \ "foo"
to get a list of all children that are labelled with"foo"
;this \ "_"
to get a list of all child elements (wildcard);this \ "@foo"
to get the unprefixed attribute"foo"
ofthis
;this \ "@{uri}foo"
to get the prefixed attribute"pre:foo"
whose prefix"pre"
is resolved to the namespace"uri"
.
For attribute projections, the resulting scala.xml.NodeSeq attribute values are wrapped in a scala.xml.Group.
There is no support for searching a prefixed attribute by its literal prefix.
The document order is preserved.
Attributes
- Inherited from:
- NodeSeq
Convenience method which returns string text of the named attribute. Use:
Convenience method which returns string text of the named attribute. Use:
that \@ "foo"
to get the string text of attribute"foo"
;
Attributes
- Inherited from:
- NodeSeq
Projection function, which returns elements of this
sequence and of all its subsequences, based on the string that
. Use:
Projection function, which returns elements of this
sequence and of all its subsequences, based on the string that
. Use:
this \\ "foo"
to get a list of all elements that are labelled with "foo", including
this`;this \\ "_"
to get a list of all elements (wildcard), includingthis
;this \\ "@foo"
to get all unprefixed attributes"foo"
;this \\ "@{uri}foo"
to get all prefixed attribute"pre:foo"
whose prefix"pre"
is resolved to the namespace"uri"
.
For attribute projections, the resulting scala.xml.NodeSeq attribute values are wrapped in a scala.xml.Group.
There is no support for searching a prefixed attribute by its literal prefix.
The document order is preserved.
Attributes
- Inherited from:
- NodeSeq
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- ScalaVersionSpecificNodeSeq (hidden)
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- PartialFunction
Convenience method, looks up a prefixed attribute in attributes of this node. Same as attributes.getValue(uri, this, key)
-
Convenience method, looks up a prefixed attribute in attributes of this node. Same as attributes.getValue(uri, this, key)
-
Value parameters
- key
-
of queried attribute.
- uri
-
namespace of queried attribute (may not be null).
Attributes
- Returns
-
value of
PrefixedAttribute
with given namespace and given key, otherwise'''null'''
. - Inherited from:
- Node
Convenience method, looks up an unprefixed attribute in attributes of this node. Same as attributes.getValue(key)
Convenience method, looks up an unprefixed attribute in attributes of this node. Same as attributes.getValue(key)
Value parameters
- key
-
of queried attribute.
Attributes
- Returns
-
value of
UnprefixedAttribute
with given key in attributes, if it exists, otherwisenull
. - Inherited from:
- Node
always empty
String representation of this node
String representation of this node
Value parameters
- stripComments
-
if true, strips comment nodes from result
Attributes
- Inherited from:
- Node
always empty
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- ScalaVersionSpecificNodeSeq (hidden)
Attributes
- Definition Classes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- SeqOps
Descendant axis (all descendants of this node, not including node itself) includes all text nodes, element nodes, comments and processing instructions.
Descendant axis (all descendants of this node, not including node itself) includes all text nodes, element nodes, comments and processing instructions.
Attributes
- Inherited from:
- Node
Descendant axis (all descendants of this node, including this node) includes all text nodes, element nodes, comments and processing instructions.
Descendant axis (all descendants of this node, including this node) includes all text nodes, element nodes, comments and processing instructions.
Attributes
- Inherited from:
- Node
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
-
ScalaVersionSpecificNodeSeq -> IterableOps
- Inherited from:
- ScalaVersionSpecificNodeSeq (hidden)
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
x
of typeAny
,x.equals(x)
should returntrue
. - It is symmetric: for any instances
x
andy
of typeAny
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any instances
x
,y
, andz
of typeAny
ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
.
If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode
to ensure that objects which are "equal" (o1.equals(o2)
returns true
) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)
).
Value parameters
- that
-
the object to compare against this object for equality.
Attributes
- Returns
-
true
if the receiver object is equivalent to the argument;false
otherwise. - Definition Classes
- Inherited from:
- Equality
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- ScalaVersionSpecificNodeSeq (hidden)
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
-
ScalaVersionSpecificNodeSeq -> IterableOps
- Inherited from:
- ScalaVersionSpecificNodeSeq (hidden)
Convenience method, same as scope.getURI(pre)
but additionally checks if scope is '''null'''
.
Convenience method, same as scope.getURI(pre)
but additionally checks if scope is '''null'''
.
Value parameters
- pre
-
the prefix whose namespace name we would like to obtain
Attributes
- Returns
-
the namespace if
scope != null
and prefix was found, elsenull
- Inherited from:
- Node
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
It's be nice to make these final, but there are probably people out there subclassing the XML types, especially when it comes to equals. However WE at least can pretend they are final since clearly individual classes cannot be trusted to maintain a semblance of order.
It's be nice to make these final, but there are probably people out there subclassing the XML types, especially when it comes to equals. However WE at least can pretend they are final since clearly individual classes cannot be trusted to maintain a semblance of order.
Attributes
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
used internally. Atom/Molecule = -1 PI = -2 Comment = -3 EntityRef = -5
used internally. Atom/Molecule = -1 PI = -2 Comment = -3 EntityRef = -5
Attributes
- Inherited from:
- Node
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- NodeSeq
Attributes
- Inherited from:
- IterableOnce
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- Iterable
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Appends qualified name of this node to StringBuilder
.
always Node.EmptyNamespace - TODO not really: Node.EmptyNamespace is "", but this is null.
always Node.EmptyNamespace - TODO not really: Node.EmptyNamespace is "", but this is null.
Attributes
- Definition Classes
-
SpecialNode -> Node
- Inherited from:
- SpecialNode
Attributes
- Definition Classes
-
ScalaVersionSpecificNodeSeq -> IterableOps
- Inherited from:
- ScalaVersionSpecificNodeSeq (hidden)
Attributes
- Inherited from:
- IterableOnceOps
Children which do not stringify to "" (needed for equality)
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- ScalaVersionSpecificNodeSeq (hidden)
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
method returning the namespace bindings of this node. by default, this is TopScope, which means there are no namespace bindings except the predefined one for "xml".
method returning the namespace bindings of this node. by default, this is TopScope, which means there are no namespace bindings except the predefined one for "xml".
Attributes
- Inherited from:
- Node
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- Inherited from:
- SeqOps
Attributes
- Definition Classes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOnce
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
- Inherited from:
- Seq
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedSeqOps
Attributes
- Definition Classes
- Inherited from:
- SeqOps
Attributes
- Inherited from:
- IterableOps
Returns a type symbol (e.g. DTD, XSD), default '''null'''
.
Attributes
- Inherited from:
- NodeSeq
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
- Inherited from:
- StrictOptimizedIterableOps
Deprecated and Inherited methods
Attributes
- Deprecated
-
[Since version 2.13.0]
Use foldLeft instead of /: - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use foldRight instead of :\\ - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead. - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use iterableFactory instead - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use `dest ++= coll` instead - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details) - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use segmentLength instead of prefixLength - Inherited from:
- SeqOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use coll instead of repr in a collection implementation, use the collection value itself from the outside - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .reverseIterator.map(f).to(...) instead of .reverseMap(f) - Inherited from:
- SeqOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Iterable.seq always returns the iterable itself - Inherited from:
- Iterable
Attributes
- Deprecated
-
[Since version 2.13.7]
toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections - Inherited from:
- Iterable
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .iterator instead of .toIterator - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .to(LazyList) instead of .toStream - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use `concat` instead - Inherited from:
- SeqOps