final class Group extends XmlNode
Class that represent a group of nodes without a container node.
You can convert a Group into Node using XmlNodeGroup.toNode
method.
<Foo a="1"> <Foo a="2"> <Foo a="3">
- Alphabetic
- By Inheritance
- Group
- XmlNode
- Xml
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asAttribute: Option[XmlAttribute]
- Definition Classes
- Xml
- final def asData: Option[XmlData]
- Definition Classes
- Xml
- final def asGroup: Option[Group]
- Definition Classes
- Xml
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def asNode: Option[Node]
- Definition Classes
- Xml
- val attributes: List[XmlAttribute]
Get the node label value
- def children: Seq[XmlNode]
- Definition Classes
- XmlNode
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def content: NodeContent
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
- returns
Node content instance
- def duplicate: Group
Create a new immutable instance with the same values of the current one
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(obj: Any): Boolean
- Definition Classes
- Xml → AnyRef → Any
- def fold[T](ifNode: (Node) => T, ifGroup: (Group) => T): T
- T
result type parameter
- ifNode
Function invoked when the current node is of type Node
- ifGroup
Function invoked when the current node is of type Group
- returns
T value
- Definition Classes
- XmlNode
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hasAllAttributes(keyValue: (String, String), keyValues: (String, String)*): Boolean
- Definition Classes
- XmlNode
- def hasAllAttributes(value: (XmlAttribute) => Boolean, values: (XmlAttribute) => Boolean*): Boolean
- Definition Classes
- XmlNode
- def hasAllAttributesKeys(key: String, keys: String*): Boolean
- Definition Classes
- XmlNode
- def hasAllAttributesKeys(key: (String) => Boolean, keys: (String) => Boolean*): Boolean
- Definition Classes
- XmlNode
- def hasChild(label: String, predicate: (XmlNode) => Boolean = _ => true): Boolean
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.
- returns
true
if the node has a child with specified label which satisfies the predicate,false
otherwise
- Definition Classes
- XmlNode
- def hasChildren: Boolean
Check if the node has children
Check if the node has children
- returns
true
if the node has children,false
otherwise
- Definition Classes
- XmlNode
- def hasText: Boolean
Check is the node has text
Check is the node has text
- returns
true
if the node has text content,false
otherwise. Alwaysfalse
if node is XmlNode.Group
- Definition Classes
- XmlNode
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final lazy val isAttribute: Boolean
- Definition Classes
- Xml
- final lazy val isData: Boolean
- Definition Classes
- Xml
- def isEmpty: Boolean
Check if the node has empty content
Check if the node has empty content
- returns
true
if node content is empty,false
otherwise
- Definition Classes
- XmlNode
- lazy val isGroup: Boolean
Check if the node is a group
Check if the node is a group
- returns
true
if node is a group,false
otherwise
- Definition Classes
- XmlNode
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final lazy val isNode: Boolean
- Definition Classes
- Xml
- final lazy val isNull: Boolean
- Definition Classes
- Xml
- val label: String
Get the node label value
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def text: Option[XmlData]
Get node text data
Get node text data
- returns
Node text if the content contains text. Always
None
if node is XmlNode.Group
- Definition Classes
- XmlNode
- def textString: String
Get node text as string
Get node text as string
- returns
Node text if the content contains text. Always
None
if node is XmlNode.Group
- Definition Classes
- XmlNode
- final def toGroup: Group
Convert the node to a group.
Convert the node to a group. If this instance already is a group it will be returned the same instance.
- Definition Classes
- XmlNode
- def toNode(label: String, attributes: List[XmlAttribute] = Nil): Node
Convert current instance to a XmlNode.Node.
Convert current instance to a XmlNode.Node.
Wrap the group with a new XmlNode
// before <Foo a="1"> <Foo a="2"> <Foo a="3"> // after <Bar> <Foo a="1"> <Foo a="2"> <Foo a="3"> </Bar>
- label
name of the wrapper node
- attributes
attributes of the wrapper node, could be empty
- returns
An XmlNode with contains the current group nodes as children.
- Annotations
- @impure()
- final def toString(): String
- Definition Classes
- Xml → AnyRef → Any
- def unsafeNarrowGroup: Group
- Definition Classes
- XmlNode
- Annotations
- @impure()
- def unsafeNarrowNode: Node
- Definition Classes
- XmlNode
- Annotations
- @impure()
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)