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