toXml method

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

Implementation

_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
  final activityMetrics = this.activityMetrics;
  final prefixLevel = this.prefixLevel;
  final $children = <_s.XmlNode>[
    if (activityMetrics != null) activityMetrics.toXml('ActivityMetrics'),
    if (prefixLevel != null) prefixLevel.toXml('PrefixLevel'),
  ];
  final $attributes = <_s.XmlAttribute>[
    ...?attributes,
  ];
  return _s.XmlElement(
    _s.XmlName(elemName),
    $attributes,
    $children,
  );
}