Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Except 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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: