Chris Angelico <ros...@gmail.com>: > XML is thus poorly suited to *most* forms of data,
Correct. > <?xml version="1.0" encoding="UTF-8" ?> > <spam> > <asdf>aa</asdf> > <qwer>qq</qwer> > <qwer>qw</qwer> > <qwer>qe</qwer> > <asdf>as</asdf> > </spam> > > What does this represent? A generic XML parser has to cope with it. I > gave this to a few XML-to-JSON converters, and they all interpreted it > as some variant of {"asdf":["aa","as"],"qwer":["qq","qw","qe"]} It's worse than that. For a *generic* parser, it should be something like: { "spam" : [ " \n", { "asdf" : [ "aa" ] }, " \n", { "qwer" : [ "qq" ] }, " \n", { "qwer" : [ "qw" ] }, " \n", { "qwer" : [ "qe" ] }, " \n", { "asdf" : [ "as" ] }, "\n" ] } > XML just needs to die. Thankfully, that seems to be happening. Marko -- https://mail.python.org/mailman/listinfo/python-list