toXml method

XmlElement toXml(
  1. String elemName, {
  2. List<XmlAttribute>? attributes,
})

Implementation

_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
  final comment = this.comment;
  final privateZone = this.privateZone;
  final $children = <_s.XmlNode>[
    if (comment != null) _s.encodeXmlStringValue('Comment', comment),
    if (privateZone != null)
      _s.encodeXmlBoolValue('PrivateZone', privateZone),
  ];
  final $attributes = <_s.XmlAttribute>[
    ...?attributes,
  ];
  return _s.XmlElement(
    _s.XmlName(elemName),
    $attributes,
    $children,
  );
}