XML to JSON converter

Turn XML into JSON and back with the browser's own parser, keeping attributes and repeated tags intact locally.

Attributes become keys prefixed with @, text becomes #text, and repeated child tags become arrays. Malformed markup is reported with the parser message instead of throwing.