4 ms·
http://xkcd.com/927/ http://xkcd.com/927/ Don't go down that path. Just write a library once to speak XMPP (or use an existing one) and then don't ever think
by sneak 13y ago
http://xkcd.com/927/ http://xkcd.com/927/
Don't go down that path. Just write a library once to speak XMPP (or use an existing one) and then don't ever think about XML again. But please don't proliferate Yet Another Standard for a problem that was fully solved a decade ago. (XMPP also has well-defined standard ways of extending on top of it. Color inside the lines, not because they're good, but because it's worse to draw new ones unique to you.)
- snuxoll 13y agoExcept you can't ever 'not think about XML' when using XMPP, especially when working with it's "well-defined ways of extending on top of it" that completely destroy any sanity that XML is supposed to provide. If you're using XML without a sane schema you might as well be using some binary format because it's about as easy to work with. XML streams, are you kidding? Who thought that making an XML parser read a mal-formed document (because it's never a complete document until the stream ends!) was a good idea! You can't even use the standard XML parser in most languages without separating out the individual responses in the stream, which aren't delineated by anything sane like a newline, but instead by a closing tag, meaning you get to sit and parse XML as it comes in, waiting for the message to be closed (and lord help you if your code doesn't handle the possibility that you'll get sent malformed data). XMPP sucks, I'm sorry, it just does. XML is not the appropriate solution to use for anything with a persistent stream, it's got shitty error recovery and requires far too much work to parse correctly even when you can guarantee you have a completely well formed document before you even start parsing it.