开发者

best way to analyze xml stanza from xmpp

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?


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜