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



16.1 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.

If you want to see what an XML tag would look like, use jabber-sexp2xml, which takes a tag and returns a string. You will usually not need it in your code, as you can use jabber-send-sexp to send away your tags to the server.