type alias XmlField

Reads and writes one XML field: an element's text, a nested element, or a run of repeated elements.

Type Parameters

The decoded value.

Properties

encode: (
name: string,
value: T
) => string

Writes value as elements named name.

decode: (
name: string,
parent: XmlElement
) => T

Reads the value from the children of parent named name.

optional
optional: boolean

true when the field may be missing; set by optional.

Usage

import { type XmlField } from "protocol/xml.ts";