Hacker News new | ask | show | jobs
by Flowdalic 1673 days ago
Using XML is one of XMPP its biggest strengths. XML is well designed, good documented and has a rich set of supporting libraries. XML documents can be composed of other XML documents in a sound fashion, which is a major feature for an extensible protocol as XMPP is, and XML documents compress well, making them suitable in low-bandwidth conditions (see [XEP-0365](https://xmpp.org/extensions/xep-0365.html)). I also never experienced a considerable battery drain when autark devices are using XMPP compared to a binary protocol.
1 comments

I've worked with XMPP for years, and while I'm not going to give XML a glowing review, I do think most alternatives would have been worse for XMPP's use-case (extensible interoperable messaging). I also think XMPP is one of a small handful of examples of XML at its best (most of the time when I see XML used extensively in other projects, it's usually a horrific experience).

It's worth noting that XMPP uses a subset of XML (so no DTDs, comments, processing instructions, is restricted to UTF-8 only, for some examples).

Framing has been mentioned elsewhere, and it's worth noting that XMPP-over-websocket is defined, well-supported and widely deployed. The websocket layer adds framing.