toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final continentCode = this.continentCode;
final countryCode = this.countryCode;
final subdivisionCode = this.subdivisionCode;
final $children = <_s.XmlNode>[
if (continentCode != null)
_s.encodeXmlStringValue('ContinentCode', continentCode),
if (countryCode != null)
_s.encodeXmlStringValue('CountryCode', countryCode),
if (subdivisionCode != null)
_s.encodeXmlStringValue('SubdivisionCode', subdivisionCode),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}