|
|
|
|
|
by olau
2673 days ago
|
|
Indeed! I was in the same boat - also started writing a client, but wasted too much time on the stupid XML stream idea. Basically, chatting is message oriented, but the XMPP inventors thought it would be neat to start the connection with a tag like <beginconversation> which would then be dangling for the whole connection, preventing the use of a simple DOM XML parser (remember this is many years ago) for each message. |
|
Just an example, here is the XML parser that I wrote in PHP https://github.com/movim/movim/blob/master/lib/moxl/src/Moxl... (127 lines), it basically handle the stream as an input and fire SimpleXML (can also be DOM XML) on the other hand.
This can handle thousands of XMPP messages (called stanza) per second :)