Best way to parse xml stanza from xmpp

I am getting a stream of xml line from log. i want to understand the flow, currently i can think of getting the spec from xmpp.org protocol and try to understand every line. Is there any better righteousness you do to understand the xml flow? any easier way?

+2


source to share


3 answers


Well, the XMPP spec is n't that scary to read, but it really helped me to get Pidgin up and running and enable the XMPP Console and watch the incoming and outgoing stanzas when interacting with the client. Spark also has something akin to "debug mode".



You will see a lot of non-core extensions for almost any client these days, so be sure to check out XEPS once you have a solid understanding of the basics.

+4


source


The PSI XMPP client is really good to use in debugging / experimenting for three reasons: (a) it allows you to open an XML console like Pidgin, (b) you can filter messages displayed with jids, and (c) you can enter raw XML- message on the console and send it. This last one turned out to be really great for quick iterative experiments.



+2


source


Actually, I've never looked at raw XML - at least not close. On the rare occasions when it was necessary, it was difficult to understand what was going on. A thorough understanding of the protocol and (most importantly) terminology is needed though. (IQ, message, presence, listing, extensions ... that kind of thing). Also, it would be nice if you feel confident with the (advanced) XML concepts (like namespaces) used by XMPP.

+1


source







All Articles