toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final date = this.date;
final days = this.days;
final storageClass = this.storageClass;
final $children = <_s.XmlNode>[
if (date != null)
_s.encodeXmlDateTimeValue('Date', date, formatter: _s.iso8601ToJson),
if (days != null) _s.encodeXmlIntValue('Days', days),
if (storageClass != null)
_s.encodeXmlStringValue('StorageClass', storageClass.toValue()),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}