Contents Menu Expand Light mode Dark mode Auto light/dark mode
ts-lib-xml documentation
ts-lib-xml documentation

API Reference

  • ts_lib_xml
    • ts_lib_xml.pydantic_xml module
    • ts_lib_xml.xml_to_dict module
Back to top

ts_lib_xml.xml_to_dict module#

The functions in this module are based on this snippet: https://stackoverflow.com/a/10077069 They follow the XML-to-JSON specification described here: https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html

xml_string_to_dict(xml_string: str) → dict[source]#

Convert an XML string to a dictionary.

Previous
ts_lib_xml.pydantic_xml module
Copyright © 2026, TetraScience
Made with Sphinx and @pradyunsg's Furo
On this page
  • ts_lib_xml.xml_to_dict module
    • xml_string_to_dict()