Next: , Previous: Connection object, Up: Hacking and extending


16.2 XML representation

The XML representation is the one generated by xml.el in Emacs, namely the following. Each tag is a list. The first element of the list is a symbol, the name of which is the name of the tag. The second element is an alist of attributes, where the keys are the attribute names in symbol form, and the values are strings. The remaining elements are the tags and data contained within the tag.

For example,

     <foo bar='baz'>
     <frobozz/>Fnord
     </foo>

is represented as

     (foo ((bar . "baz")) (frobozz nil "") "Fnord
     ")

Note the empty string as the third element of the frobozz list. It is not present in newer (post-21.3) versions of xml.el, but it's probably best to assume it might be there.

— Function: jabber-sexp2xml xml-sexp

This function takes a tag in list representation, and returns its XML representation as a string. You will normally not need to use this function directly, but it can be useful to see how your sexps will look when sent to the outer, non-Lisp, world.

— Function: jabber-send-sexp connection sexp

This function sends sexp, an XMPP stanza in list representation, and sends it over connection.

You will normally use the functions jabber-send-presence, jabber-send-message and jabber-send-iq instead of this function.