views:

255

answers:

3

i get stream of xml stanza from log. i want to understand the flow , currently what i can think of is get the spec from xmpp.org protocol and try to understanding each line. Is there any best prastice do you folks do to understand the xml stream? any easier way?

+1  A: 

Actually, I never looked at the raw XML - at least not closely. In those rare cases, where it was necessary, it wasn't to difficult to understand what was going on. Though it's necessary to get a thorough understanding of the protocol and (most importantly) the terminology. (IQ, message, presence, roster, extensions ... that kind of stuff). Additionally, it would be good if you're feeling confident with (advanced) XML concepts (e.g. namespaces) as used by XMPP.

sfussenegger
+1  A: 

Well, the XMPP spec isn't such a terrible read, but what really helped me was to fire up Pidgin and turn on the XMPP Console plugin and watch the incoming and outgoing stanzas as you interact with the client. Spark also has something similar with "debug mode".

You will see a lot of non-core extensions at play in pretty much any client these days, so be sure to check out the XEPS once you have got a solid understanding of the basics.

deeringc
+1  A: 

The PSI XMPP client is really nice to use in debugging/experimenting for three reasons: (a) it allows you to open an XML console like Pidgin, (b) you can filter the messages displayed by jids involved, and (c) you can input a raw XML message on the console and send it. That last one has proved really great for fast iterative experimentation.

Bill Barnhill