Both approaches are similarly flawed, but XML would actually work much better for what you're trying to do with JSON - and much more readable.
I may have got used to the syntax I came up with, but all XML based scripts seem more verbose and less readable. I guess, each to its own...