An immutable data object representing an XML element.
Child elements can be other Elems or any one of the other Node types.
XML attributes are implemented with the scala.xml.MetaData base class.
Optional XML namespace scope is represented by scala.xml.NamespaceBinding.
Value parameters
- attributes1
-
the attribute map
- child
-
the children of this node
- label
-
the element name
- minimizeEmpty
-
true
if this element should be serialized as minimized (i.e. "<el/>") when empty;false
if it should be written out in long form. - prefix
-
namespace prefix (may be null, but not the empty string)
- scope
-
the scope containing the namespace bindings
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Nodeclass NodeSeqtrait Serializabletrait Equalityclass AbstractSeq[Node]trait Equalsclass AbstractIterable[Node]trait IterableOnce[Node]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Returns a new element with updated attributes, resolving namespace uris from this element's scope. See MetaData.update for details.
Returns a new element with updated attributes, resolving namespace uris from this element's scope. See MetaData.update for details.
Value parameters
- updates
-
MetaData with new and updated attributes
Attributes
- Returns
-
a new symbol with updated attributes
Returns a copy of this element with any supplied arguments replacing this element's value for that field.
Returns a copy of this element with any supplied arguments replacing this element's value for that field.
Attributes
- Returns
-
a new symbol with updated attributes
The logic formerly found in typeTag$, as best I could infer it.
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
String representation of this node
String representation of this node
Value parameters
- stripComments
-
if true, strips comment nodes from result
Attributes
- Inherited from:
- Node
We insist we're only equal to other xml.Equality
implementors, which heads off a lot of inconsistency up front.
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
.
convenience, same as getNamespace(this.prefix)
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
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
Concrete fields
Returns attribute meaning all attributes of this node, prefixed and unprefixed, in no particular order. In class Node
, this defaults to Null
(the empty attribute list).
Returns attribute meaning all attributes of this node, prefixed and unprefixed, in no particular order. In class Node
, this defaults to Null
(the empty attribute list).
Attributes
- Returns
-
all attributes of this node
Returns child axis i.e. all children of this node.
Returns child axis i.e. all children of this node.
Attributes
- Returns
-
all children of this node
label of this node. I.e. "foo" for <foo/>)
label of this node. I.e. "foo" for <foo/>)
Attributes
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".