toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final cookies = this.cookies;
final queryString = this.queryString;
final headers = this.headers;
final queryStringCacheKeys = this.queryStringCacheKeys;
final $children = <_s.XmlNode>[
_s.encodeXmlBoolValue('QueryString', queryString),
cookies.toXml('Cookies'),
if (headers != null) headers.toXml('Headers'),
if (queryStringCacheKeys != null)
queryStringCacheKeys.toXml('QueryStringCacheKeys'),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}