Open BrendanJM opened 2 years ago
Example:
print(xmltodict.unparse({'a': {'@foo': True}}))
output:
<?xml version="1.0" encoding="utf-8"?> <a foo="True"></a>
According to the XML Schema Specification the correct output should be
<?xml version="1.0" encoding="utf-8"?> <a foo="true"></a>
Related issue only fixed boolean unparsing in children, but did not resolve attributes: https://github.com/martinblech/xmltodict/issues/179
I've the same problem. I've created two pull requests. One does just the minimal changes to solve the problem, the other also removes Python 2 compatibility tricks. I hope that one of them will be merged. :-)
Example:
output:
According to the XML Schema Specification the correct output should be
Related issue only fixed boolean unparsing in children, but did not resolve attributes: https://github.com/martinblech/xmltodict/issues/179