Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need process bool in right way #67

Closed
webclerk opened this issue Mar 30, 2019 · 3 comments
Closed

need process bool in right way #67

webclerk opened this issue Mar 30, 2019 · 3 comments

Comments

@webclerk
Copy link

webclerk commented Mar 30, 2019

def test_xml_result():
        dict_data = {
            'token': None,
            'version': None,
            'create_time': 12345,
            'succeed': True,
            'messages': [],
            'data': {'A': 1}
        }
        print(dicttoxml(dict_data))

the result is

<?xml version="1.0" encoding="UTF-8" ?><root><token type="null"></token><version type="null"></version><create_time type="int">12345</create_time><succeed type="bool">True</succeed><messages type="list"></messages><data type="dict"><A type="int">1</A></data></root>

In fact, True is not the xml bool value type, it should be true.
We fixed this issue, please check the attachment file, it's the code.

dicttoxml_fix_bool_issue.txt

@svobora
Copy link

svobora commented Feb 28, 2020

You library generates invalid xml files due to True and False as boolean values, instead of correct true and false. Why don't you fix this capitalization problem? It is a one-liner.

@mangin
Copy link

mangin commented Sep 6, 2021

#84

@quandyfactory
Copy link
Owner

This issue is fixed in version 1.7.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants