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