toXml method

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

Implementation

_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
  final grants = this.grants;
  final owner = this.owner;
  final $children = <_s.XmlNode>[
    if (grants != null)
      _s.XmlElement(_s.XmlName('AccessControlList'), [],
          grants.map((e) => e.toXml('Grant'))),
    if (owner != null) owner.toXml('Owner'),
  ];
  final $attributes = <_s.XmlAttribute>[
    ...?attributes,
  ];
  return _s.XmlElement(
    _s.XmlName(elemName),
    $attributes,
    $children,
  );
}