zio.blocks.schema.xml

Members list

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Source
BuildInfo.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
BuildInfo.type
object ReaderConfig

Attributes

Companion
class
Source
ReaderConfig.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ReaderConfig(maxDepth: Int = ..., maxAttributes: Int = ..., maxTextLength: Int = ..., preserveWhitespace: Boolean = ...)

Configuration for XML reader behavior and limits.

Configuration for XML reader behavior and limits.

Value parameters

maxAttributes

Maximum number of attributes per element

maxDepth

Maximum nesting depth for XML elements (prevents stack overflow attacks)

maxTextLength

Maximum length of text content

preserveWhitespace

If true, preserve all whitespace in text nodes; if false, trim leading/trailing whitespace

Attributes

Companion
object
Source
ReaderConfig.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object WriterConfig

Attributes

Companion
class
Source
WriterConfig.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class WriterConfig(indentStep: Int = ..., includeDeclaration: Boolean = ..., encoding: String = ...)

Configuration for XML writing.

Configuration for XML writing.

Value parameters

encoding

Character encoding to specify in the XML declaration.

includeDeclaration

Whether to include the XML declaration ().

indentStep

Number of spaces per indentation level. 0 means no indentation.

Attributes

Companion
object
Source
WriterConfig.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait Xml

A sealed trait representing an XML node.

A sealed trait representing an XML node.

The Xml type provides a complete representation of XML data with five possible cases: Element, Text, CData, Comment, and ProcessingInstruction.

Attributes

Companion
object
Source
Xml.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CData
class Comment
class Element
class Text
object Xml

Attributes

Companion
trait
Source
Xml.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Xml.type
object XmlBuilder

A fluent builder for constructing XML nodes programmatically.

A fluent builder for constructing XML nodes programmatically.

Provides factory methods for creating XML nodes and an ElementBuilder class for building elements with a fluent API.

Example:

val elem = XmlBuilder.element("root")
 .attr("id", "1")
 .attr("class", "main")
 .child(XmlBuilder.element("child").text("content").build)
 .build

Attributes

Source
XmlBuilder.scala
Supertypes
class Object
trait Matchable
class Any
Self type
XmlBuilder.type
abstract class XmlCodec[A] extends BinaryCodec[A]

Attributes

Companion
object
Source
XmlCodec.scala
Supertypes
class BinaryCodec[A]
class Object
trait Matchable
class Any
object XmlCodec

Attributes

Companion
class
Source
XmlCodec.scala
Supertypes
class Object
trait Matchable
class Any
Self type
XmlCodec.type

Attributes

Companion
object
Source
XmlCodecDeriver.scala
Supertypes
trait Deriver[XmlCodec]
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
class
Source
XmlCodecDeriver.scala
Supertypes
trait Deriver[XmlCodec]
class Object
trait Matchable
class Any
Self type
class XmlCodecError(var spans: List[Node], message: String) extends Throwable

A custom exception class without the stack trace representing errors that occur during XML encoding/decoding operations.

A custom exception class without the stack trace representing errors that occur during XML encoding/decoding operations.

The XmlCodecError class extends Throwable to provide enhanced error reporting for scenarios involving XML encoding or decoding errors where dynamic data paths (spans) are involved. These spans represent the stack of nodes traversed within the data structure when the error occurred. So that top-level spans are at the end of the list.

Value parameters

message

A descriptive message providing additional context or details about the error.

spans

A list of DynamicOptic.Node objects representing the traversal path within the data structure where the error occurred. Each node encapsulates information about a specific element (field, index, etc.).

Attributes

Source
XmlCodecError.scala
Supertypes
class Throwable
trait Serializable
class Object
trait Matchable
class Any
object XmlFormat extends BinaryFormat[XmlCodec]

Attributes

Source
XmlCodecDeriver.scala
Supertypes
trait Format
class Object
trait Matchable
class Any
Self type
XmlFormat.type
final case class XmlName(localName: String, prefix: Option[String] = ..., namespace: Option[String] = ...)

Represents an XML qualified name with an optional namespace URI and prefix.

Represents an XML qualified name with an optional namespace URI and prefix.

Value parameters

localName

The local part of the name (without prefix)

namespace

Optional namespace URI

prefix

Optional namespace prefix (used for display purposes)

Attributes

Companion
object
Source
XmlName.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object XmlName

Attributes

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

Attributes

Companion
class
Source
XmlPatch.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
XmlPatch.type
final case class XmlPatch(ops: Chunk[Op])

An immutable patch for XML modification operations.

An immutable patch for XML modification operations.

XmlPatch provides a composable way to modify XML documents with operations similar to JSON Patch but tailored for XML's structure. Patches can be composed using ++ and applied to XML values using apply.

Value parameters

ops

The sequence of patch operations to apply

Attributes

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

Attributes

Source
XmlReader.scala
Supertypes
class Object
trait Matchable
class Any
Self type
XmlReader.type
final case class XmlSelection(either: Either[SchemaError, Chunk[Xml]]) extends AnyVal

A wrapper around Either[SchemaError, Chunk[Xml]] that provides fluent chaining for XML navigation and querying operations.

A wrapper around Either[SchemaError, Chunk[Xml]] that provides fluent chaining for XML navigation and querying operations.

XmlSelection enables a fluent API style for navigating through XML structures:

 xml.get("users").elements.apply(0).get("name").texts

The selection can contain zero, one, or multiple XML values, supporting both single-value navigation and multi-value queries.

Attributes

Companion
object
Source
XmlSelection.scala
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all
object XmlSelection

Attributes

Companion
class
Source
XmlSelection.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object XmlType

Attributes

Companion
trait
Source
XmlType.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
XmlType.type
sealed trait XmlType extends Xml => Boolean

A sealed trait representing the type of XML node.

A sealed trait representing the type of XML node.

Each case provides two type members:

  • Type: The corresponding Xml subtype (e.g., Xml.Element)
  • Unwrap: The underlying Scala type of the value

Attributes

Companion
object
Source
XmlType.scala
Supertypes
trait Xml => Boolean
class Object
trait Matchable
class Any
Known subtypes
object CData
object Comment
object Element
object Text
object XmlWriter

JVM implementation of XmlWriter for serializing Xml AST nodes to XML strings.

JVM implementation of XmlWriter for serializing Xml AST nodes to XML strings.

Attributes

Source
XmlWriter.scala
Supertypes
class Object
trait Matchable
class Any
Self type
XmlWriter.type
object syntax

Attributes

Source
syntax.scala
Supertypes
class Object
trait Matchable
class Any
Self type
syntax.type
object xmlAttribute

Attributes

Companion
class
Source
xmlAttribute.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class xmlAttribute(name: String = ...) extends StaticAnnotation

Marks a field to be encoded as an XML attribute instead of a child element.

Marks a field to be encoded as an XML attribute instead of a child element.

Value parameters

name

Optional custom name for the attribute. If empty, the field name is used.

Attributes

Companion
object
Source
xmlAttribute.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all
object xmlNamespace

Attributes

Companion
class
Source
xmlNamespace.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class xmlNamespace(uri: String, prefix: String = ...) extends StaticAnnotation

Specifies the XML namespace for a type.

Specifies the XML namespace for a type.

Value parameters

prefix

Optional namespace prefix (e.g., "atom"). If empty, uses default namespace.

uri

The namespace URI (e.g., "http://www.w3.org/2005/Atom")

Attributes

Companion
object
Source
xmlNamespace.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
Show all