XmlPatch

zio.blocks.schema.xml.XmlPatch
See theXmlPatch companion class
object XmlPatch

Attributes

Companion
class
Source
XmlPatch.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
XmlPatch.type

Members list

Type members

Classlikes

final case class Op(path: DynamicOptic, operation: Operation)

A single patch operation paired with the path to apply it at.

A single patch operation paired with the path to apply it at.

Value parameters

operation

The operation to apply at the path

path

The path indicating where to apply the operation

Attributes

Source
XmlPatch.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Operation

Attributes

Companion
trait
Source
XmlPatch.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Operation.type
sealed trait Operation

Sealed trait representing a single patch operation.

Sealed trait representing a single patch operation.

Attributes

Companion
object
Source
XmlPatch.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Add
object Remove
class Replace
class SetAttribute
object Position

Attributes

Companion
trait
Source
XmlPatch.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Position.type
sealed trait Position

Position enum for Add operation - where to insert the new content relative to the target.

Position enum for Add operation - where to insert the new content relative to the target.

Attributes

Companion
object
Source
XmlPatch.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object After
object AppendChild
object Before
object PrependChild

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def add(path: DynamicOptic, content: Xml, position: Position): XmlPatch

Creates a patch that adds content at the specified position.

Creates a patch that adds content at the specified position.

Value parameters

content

The content to add

path

The path to the target element

position

Where to insert the content

Attributes

Returns

A new patch with the add operation

Source
XmlPatch.scala

Creates a patch that removes the element at the path.

Creates a patch that removes the element at the path.

Value parameters

path

The path to the element to remove

Attributes

Returns

A new patch with the remove operation

Source
XmlPatch.scala
def removeAttribute(path: DynamicOptic, name: String): XmlPatch

Creates a patch that removes an attribute from the target element.

Creates a patch that removes an attribute from the target element.

Value parameters

name

The attribute name to remove

path

The path to the target element

Attributes

Returns

A new patch with the remove attribute operation

Source
XmlPatch.scala
def replace(path: DynamicOptic, content: Xml): XmlPatch

Creates a patch that replaces the element at the path.

Creates a patch that replaces the element at the path.

Value parameters

content

The replacement content

path

The path to the element to replace

Attributes

Returns

A new patch with the replace operation

Source
XmlPatch.scala
def setAttribute(path: DynamicOptic, name: String, value: String): XmlPatch

Creates a patch that sets an attribute on the target element.

Creates a patch that sets an attribute on the target element.

Value parameters

name

The attribute name

path

The path to the target element

value

The attribute value

Attributes

Returns

A new patch with the set attribute operation

Source
XmlPatch.scala

Concrete fields

Empty patch - identity element for composition.

Empty patch - identity element for composition.

Attributes

Source
XmlPatch.scala