encodeAttributeValue method
Encodes a string to be serialized as XML attribute value.
Implementation
@override
String encodeAttributeValue(String input, XmlAttributeType type) {
switch (type) {
case XmlAttributeType.SINGLE_QUOTE:
return input.replaceAllMapped(
_singeQuoteAttributePattern, _singeQuoteAttributeReplace);
case XmlAttributeType.DOUBLE_QUOTE:
return input.replaceAllMapped(
_doubleQuoteAttributePattern, _doubleQuoteAttributeReplace);
}
}