We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current behavior: xmltodict discards DOCTYPE.
Expected behavior: xmltodict should keep DOCTYPE
Reproduction:
import xmltodict xml = """\ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE library PUBLIC "-//Example//DTD Library 1.0//EN" "http://www.example.com/DTD/library.dtd"> <library> <book> <title>XML Basics</title> <author>John Doe</author> <published>2020</published> </book> <book> <title>Advanced XML Techniques</title> <author>Jane Smith</author> <published>2021</published> </book> </library> """ parsed = xmltodict.parse(xml) unparsed = xmltodict.unparse(parsed, pretty=True) print(unparsed) # <?xml version="1.0" encoding="utf-8"?> # <library> # <book> # <title>XML Basics</title> # <author>John Doe</author> # <published>2020</published> # </book> # <book> # <title>Advanced XML Techniques</title> # <author>Jane Smith</author> # <published>2021</published> # </book> # </library>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current behavior:
xmltodict discards DOCTYPE.
Expected behavior:
xmltodict should keep DOCTYPE
Reproduction:
The text was updated successfully, but these errors were encountered: