XmlNodeNodeWriteOps

cats.xml.XmlNodeSyntax.XmlNodeNodeWriteOps
implicit class XmlNodeNodeWriteOps(node: Node)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def appendAttr(newAttr: XmlAttribute): Node
def appendAttrs(newAttr: XmlAttribute, newAttrs: XmlAttribute*): Node
def appendAttrs(newAttrs: Seq[XmlAttribute]): Node
def prependAttr(newAttr: XmlAttribute): Node
def prependAttrs(newAttr: XmlAttribute, newAttrs: XmlAttribute*): Node
def prependAttrs(newAttrs: Seq[XmlAttribute]): Node
def removeAttr(key: String): Node
def updateAttr(key: String)(f: () => XmlAttribute): Node
def updateText[T : DataEncoder](f: () => T)(implicit evidence$2: Decoder[T], evidence$3: DataEncoder[T], dmi: DummyImplicit): Node

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

def updateText[T1 : Decoder, T2 : DataEncoder](f: T1 => T2): Node

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

def updateTextRaw[T : DataEncoder](f: XmlData => T): Node

Update node text if content is text.

Update node text if content is text.

If you need decoded data see updateText

Attributes

def withAttrs(attrs: Seq[XmlAttribute]): Node
def withAttrs(attr: XmlAttribute, attrs: XmlAttribute*): Node
def withAttrsMap(attrs: (String, String)*): Node
def withAttrsMap(attrs: Map[String, String]): Node
def withLabel(newLabel: String): Node

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

def withText[T : DataEncoder](data: T): Node

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

def withAttributes(attrs: Seq[XmlAttribute]): Node

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.