encodeAttributes static method
Encodes attributes from a map to an XML String
Implementation
static String encodeAttributes(Map<String, dynamic> attr) {
final buff = StringBuffer();
for (var key in attr.keys) {
buff.write('<attribute><name>$key</name>'
'<value>${attr[key]}</value></attribute>');
}
return buff.toString().replaceAll('>', '>').replaceAll('<', '<');
}