Parsing is hard. I know it's fun to do, and I'm not knocking the utility of implementations like we're discussing, but like this conversation makes plain: Parsing is hard. Good parsers tend to be front-line products in and of themselves. (Consider FFMPEG, Firefox/Chrome, compilers, etc.)
If thou, as a mere mortal, must implementsted parsing, use a library, or if you're doing something genuinely novel and must have a DSL, use YACC/bison/whatthefuckever. Some declarative/functional languages have good parsing abilities too, but those aren't mere mortal languages.
The problem with parsing lies in the edge cases. Formats as big as JSON and XML are riddled with footguns. Use a library to mitigate those (and offload blame!) and you will be much happier and your productivity will thank you for it. (You'll find fun shit this way too, like how MS Office's XML formats (used in Sharepoint) were at odds with MS VS's XML formats and require special conversion to handle the quirks of both.)
If I was doing JSON-XML conversion? I'd be bouncing it off of a Postgres instance. Postgres has great import/export of both, and proper data-driven representation of your data is going to aid conversion.