Logo JDeck

JDeck.Xml a XmlEssentials wrapper

JDeck.Xml is a Thoth.Json-like Xml decoder based on XmlEssentials (CloudNimble.Text.Xml). The API mirrors JDeck for JSON: automatic decoding for plain records, manual Decoder<'T> values for unions and irregular payloads, and Encoder<'T> values plus a Codec bridge for the automatic path.

The package targets net10.0, the minimum target of XmlEssentials.

Usage

open JDeck.Xml

[<CLIMutable>]
type Person = { Name: string; Age: int }

let xml = """<Person><Name>Alice</Name><Age>30</Age></Person>"""

let result: Result<Person, DecodeError> = Decoding.auto(xml)

Guides:

Multiple items
type CLIMutableAttribute = inherit Attribute new: unit -> CLIMutableAttribute

--------------------
new: unit -> CLIMutableAttribute
type Person = { Name: string Age: int }
Multiple items
val string: value: 'T -> string

--------------------
type string = System.String
Multiple items
val int: value: 'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int
val xml: string
val result: obj
Multiple items
module Result from Microsoft.FSharp.Core

--------------------
type Result<'T,'TError> = | Ok of ResultValue: 'T | Error of ErrorValue: 'TError

Type something to start searching.