Maps a field to an attribute on the element. Same parameters and
meanings as XmlElement - including omitEmpty's scalar-only contract (it
is a build error on a collection or non-zeroable type) and the auto-derived
read fallback that makes a paired defaultValue redundant. A namespace:
URI is bound at the use-site and auto-declared at the root by the hoist walk;
its write prefix is resolved from the class
@XmlSerializer(namespaces: ...) map, with prefix: an optional per-field
override that requires a namespace:.
Maps a field to a child element. This is the default: a public field
with no node-kind annotation is treated as @XmlElement, named via the
class fieldRename.
The raw-element escape hatch: full control over a whole element when its
shape (attributes, children, conditional namespaces) genuinely cannot be
described declaratively. Reach for it only for un-mappable bodies - anything
expressible as @XmlAttribute/@XmlElement fields should stay plain
@XmlSerializer. readElement receives the matched element;
buildElementBody is given a builder positioned inside the already-open
element.
Annotates a Dart enum, paired with XmlValue on each constant.
unknownValue is the constant to fall back to when an inbound literal
matches no XmlValue; null => an unknown literal is an error on read.
Declares a type's own XML element identity. Carried only by a type that can
stand as a document root; a nested type carries just XmlSerializer and is
named by its use-site.
Maps a field to the element's character data (text). A text node has no name
and no namespace/prefix, so it carries only omitEmpty. With the default
false, an empty string still emits <t></t>.