toXml method

XmlNode toXml()

Implementation

XmlNode toXml() {
  final builder = XmlBuilder();
  builder.element(
    'OutputSerialization',
    nest: () {
      if (cSV != null) {
        builder.element(
          'CSV',
          nest: (cSV!.toXml() as XmlDocument).rootElement.children,
        );
      }

      if (jSON != null) {
        builder.element(
          'JSON',
          nest: (jSON!.toXml() as XmlDocument).rootElement.children,
        );
      }
    },
  );
  return builder.buildDocument();
}