Node
Represent a simple single XML node.
<Bar>
<Foo a="1">
<Foo a="2">
<Foo a="3">
</Bar>
Attributes
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Get the node label value
Get the node label value
<Foo a="1" b="2" ></Foo> //a="1" b="2"
Attributes
- Returns
-
list of node attributes
- Definition Classes
Return the node content which can be:
Return the node content which can be:
If you need a specific kind of content please use either XmlNode.text, XmlNode.isEmpty or XmlNode.children instead
Attributes
- Returns
-
Node content instance
- Definition Classes
Get the node label value
Get the node label value
<Foo></Foo> //foo
Attributes
- Returns
-
node label string
- Definition Classes
Decode and then update node text if content is text.
Decode and then update node text if content is text.
If you need raw data see updateTextRaw
Attributes
Decode and then update node text if content is text.
Decode and then update node text if content is text.
If you need raw data see updateTextRaw
Attributes
Update node text if content is text.
Update node text if content is text.
If you need decoded data see updateText
Attributes
Rename node label. This method isn't pure for usability purpose.
Rename node label. This method isn't pure for usability purpose.
Throws IllegalArgumentException
If the new label values is not valid. See Xml.isValidXmlName
Value parameters
- newLabel
-
new label value
Attributes
- Returns
-
Same node with updated label
Set node content to Text with the specified data. All children nodes will be removed.
Set node content to Text with the specified data. All children nodes will be removed.
Attributes
Deprecated methods
Attributes
- Deprecated
-
[Since version 0.0.14]
Use withAttrs instead. This method will be removed in the future versions.
Attributes
- Deprecated
-
[Since version 0.0.14]
Use withAttrs instead. This method will be removed in the future versions.
Inherited methods
Attributes
- Inherited from:
- Xml
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
Type parameters
- T
-
result type parameter
Value parameters
- ifGroup
-
Function invoked when the current node is of type Group
- ifNode
-
Function invoked when the current node is of type Node
Attributes
- Returns
-
T value
- Inherited from:
- XmlNode
Attributes
- Inherited from:
- XmlNode
Attributes
- Inherited from:
- XmlNode
Attributes
- Inherited from:
- XmlNode
Attributes
- Inherited from:
- XmlNode
Check if the node has a child with the specified label which satisfies the specified predicate.
Check if the node has a child with the specified label which satisfies the specified predicate.
Attributes
- Returns
-
true
if the node has a child with specified label which satisfies the predicate,false
otherwise - Inherited from:
- XmlNode
Check if the node has children
Check if the node has children
Attributes
- Returns
-
true
if the node has children,false
otherwise - Inherited from:
- XmlNode
Check is the node has text
Check is the node has text
Attributes
- Returns
-
true
if the node has text content,false
otherwise. Alwaysfalse
if node is XmlNode.Group - Inherited from:
- XmlNode
Check if the node has empty content
Check if the node has empty content
Attributes
- Returns
-
true
if node content is empty,false
otherwise - Inherited from:
- XmlNode
Get node text data
Get node text data
Attributes
- Returns
-
Node text if the content contains text. Always
None
if node is XmlNode.Group - Inherited from:
- XmlNode
Get node text as string
Get node text as string
Attributes
- Returns
-
Node text if the content contains text. Always
None
if node is XmlNode.Group - Inherited from:
- XmlNode
Convert the node to a group. If this instance already is a group it will be returned the same instance.
Convert the node to a group. If this instance already is a group it will be returned the same instance.
Attributes
- Inherited from:
- XmlNode
Attributes
- Inherited from:
- XmlNode
Attributes
- Inherited from:
- XmlNode