toXml method

XmlNode toXml()

Implementation

XmlNode toXml() {
  final builder = XmlBuilder();
  builder.element('CORSRule', nest: () {
    builder.element('AllowedHeaders', nest: allowedHeaders);
    builder.element('AllowedMethods', nest: allowedMethods);
    builder.element('AllowedOrigins', nest: allowedOrigins);
    builder.element('ExposeHeaders', nest: exposeHeaders);
    builder.element('MaxAgeSeconds', nest: maxAgeSeconds.toString());
  });
  return builder.buildDocument();
}