Source text
Paste text or upload a file
Result
Type is not detected yet
Statistics appear after formatting
Parses XML with lxml and outputs the same data as a Python dict — no manual xml.etree tree-walking required.
An element's attributes end up in a nested dict under the '@attributes' key, and its inline text goes under '#text' when the element has both attributes and children. Attribute and text values are always strings, even when they look like numbers.
Several child tags with the same name automatically become a Python list under that key — no need to write code that checks whether there's one element or several.