Hacker News new | ask | show | jobs
by mickael 323 days ago
You need a stream parser like expat. No need to code your custom parser and once you settle at level n+1 in the XML it is just like parsing independent document. But again, the parsing is hidden by existing XMPP library, so you do not even need to go to that level of details.
1 comments

I meant for implementing the protocol of course. If you don't have to implement it, then of course it does not matter as much if it's bad or not.

At the time I was looking into it closely, there were issues with XML, like with the starttls messing the original document, there were issues with XML validation (for xml namespaces I think?), and other minors arrangements with the XML spec such that using a normal pull parsing lib was not enough to solve all problems. But it was quite a long time ago (10+ years), possibly that have been solved for a while.

in term of practical impact of using XML like this, at the time, the server has to practically parse everything that was in the content of messages not addressed to the server itself. I would imagine a reasonable protocol should separate addressing from the content in such a way that the router doesn't have to parse all the content to do its job