encode method
Implementation
@override
XmlNode encode(Object? value, XmlCodecEncodeSignature? encode) =>
switch (value) {
_ when value is T => XmlElement(
XmlName(nodeLocalName),
[],
[XmlText(encodeValue(value))],
),
_ => throw ArgumentError(),
};