Skip to content
sprsquish edited this page Aug 12, 2010 · 1 revision

Stanza objects are a sort of XML to Object mapping that makes working in Blather feel more like normal object-oriented programing than writing XML. Each stanza type is mapped to an object that attempts to extract the relevant data from the XML and present it in an OO fashion. This means more programming and less trying to figure out XPath.

However, if you’re masochistic enough to actually want to write XPath queries on the stanza, you’re free to do so. They’re all LibXML::Nodes wrapped in a nice shell. Feel free to manipulate them as you would an XML node. Mind the namespacing though. Blather works to ensure namespaces are properly handled.

If you’d like to see the current set of XMPP stanzas that are supported as objects you can look through the stanzas dir