How it works
Attributes become keys prefixed with @, repeated elements become arrays, and text next to attributes is stored as #text.
Frequently asked questions
Why is a single child not an array?
Only repeated sibling elements become arrays. Check for that when reading the output in code.