Header menu logo CodecMapper

Xml Module

XML codec compilation and runtime helpers. The XML backend intentionally supports a smaller explicit subset than the JSON backend: element content only, repeated `` nodes for collections, and ignorable inter-element whitespace.

Types

Type Description

Codec<'T>

A compiled XML codec for a specific schema.

CompiledCodec

XmlSource

The byte-level input state for XML decoding.

XmlWriter

The byte-level output abstraction used by XML encoders.

Functions and values

Function or value Description

buildAndCompile builder

Full Usage: buildAndCompile builder

Parameters:
Returns: Codec<'T>
Modifiers: inline
Type parameters: 'T

Inline schema pipelines read more clearly when the final `build` and XML compile step collapse into one terminal pipeline stage.

builder : Builder<'T, 'T>
Returns: Codec<'T>

codec schema

Full Usage: codec schema

Parameters:
Returns: Codec<'T>

`codec` mirrors `Json.codec` for callers that still prefer the direct schema-to-codec alias over the longer `compile` name.

schema : Schema<'T>
Returns: Codec<'T>

compile schema

Full Usage: compile schema

Parameters:
Returns: Codec<'T>

Compiles a schema into a reusable XML codec.

schema : Schema<'T>
Returns: Codec<'T>

compileUntyped schema

Full Usage: compileUntyped schema

Parameters:
Returns: CompiledCodec
schema : ISchema
Returns: CompiledCodec

deserialize codec xml

Full Usage: deserialize codec xml

Parameters:
    codec : Codec<'T>
    xml : string

Returns: 'T

Deserializes an XML payload using the schema-derived root element name.

codec : Codec<'T>
xml : string
Returns: 'T

deserializeBytes codec bytes

Full Usage: deserializeBytes codec bytes

Parameters:
    codec : Codec<'T>
    bytes : byte[]

Returns: 'T

Deserializes a UTF-8 byte payload using a previously compiled XML codec.

codec : Codec<'T>
bytes : byte[]
Returns: 'T

serialize codec value

Full Usage: serialize codec value

Parameters:
    codec : Codec<'T>
    value : 'T

Returns: string

Serializes a value to XML using the schema-derived root element name.

codec : Codec<'T>
value : 'T
Returns: string

Type something to start searching.