toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final allowQuotedRecordDelimiter = this.allowQuotedRecordDelimiter;
final comments = this.comments;
final fieldDelimiter = this.fieldDelimiter;
final fileHeaderInfo = this.fileHeaderInfo;
final quoteCharacter = this.quoteCharacter;
final quoteEscapeCharacter = this.quoteEscapeCharacter;
final recordDelimiter = this.recordDelimiter;
final $children = <_s.XmlNode>[
if (fileHeaderInfo != null)
_s.encodeXmlStringValue('FileHeaderInfo', fileHeaderInfo.toValue()),
if (comments != null) _s.encodeXmlStringValue('Comments', comments),
if (quoteEscapeCharacter != null)
_s.encodeXmlStringValue('QuoteEscapeCharacter', quoteEscapeCharacter),
if (recordDelimiter != null)
_s.encodeXmlStringValue('RecordDelimiter', recordDelimiter),
if (fieldDelimiter != null)
_s.encodeXmlStringValue('FieldDelimiter', fieldDelimiter),
if (quoteCharacter != null)
_s.encodeXmlStringValue('QuoteCharacter', quoteCharacter),
if (allowQuotedRecordDelimiter != null)
_s.encodeXmlBoolValue(
'AllowQuotedRecordDelimiter', allowQuotedRecordDelimiter),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}