I hate XML

05/06/2020

Xmlsucks

The above screenshot is the difference between an XML product feed that Facebook can't be parsed (top) and one that can (bottom). A default namespace declaration. Why does this matter? I don't know. What I do know is that getting my XML builder to remove this declaration and still not litter my XML with g-prefix tags was a massive mission so I can only assume that there's some XML thing that everyone knows about and I don't which makes this a problem. Even if there is, it's stupid. Every time I come up against something like this involving XML, I remember a phrase (I can't remember who said it. I think it was in Nokogiri's footer at some point): "XML is like violence. If it doesn't solve your problem, you aren't using enough of it".

I'm so grateful for JSON.