toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final displayName = this.displayName;
final id = this.id;
final $children = <_s.XmlNode>[
if (id != null) _s.encodeXmlStringValue('ID', id),
if (displayName != null)
_s.encodeXmlStringValue('DisplayName', displayName),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}