comparison libpurple/xmlnode.h @ 32037:114a98da1a5f

xmlnode: Fix some brokeness in xmlnode serialization with prefixed elements. Basically we were treating node->xmlns as the default namespace, but that isn't the case with prefexed elements. In our serialization, I believe we were adding an extraneous xmlns='' to a prefixed element, which changes the (default) namespace for its children. (It's been a bit too long with this in my tree, so I've forgotten the exact details)
author Paul Aurich <paul@darkrain42.org>
date Sun, 04 Sep 2011 18:52:18 +0000
parents 67addaf8677f
children 8d3b5853b017
comparison
equal deleted inserted replaced
32036:a9f13cb4e945 32037:114a98da1a5f
219 * Returns the namespace of a node 219 * Returns the namespace of a node
220 * 220 *
221 * @param node The node to get the namepsace from 221 * @param node The node to get the namepsace from
222 * @return The namespace of this node 222 * @return The namespace of this node
223 */ 223 */
224 const char *xmlnode_get_namespace(xmlnode *node); 224 const char *xmlnode_get_namespace(const xmlnode *node);
225
226 /**
227 * Returns the current default namespace. The default
228 * namespace is the current namespace which applies to child
229 * elements which are unprefixed and which do not contain their
230 * own namespace.
231 *
232 * For example, given:
233 * <iq type='get' xmlns='jabber:client' xmlns:ns1='http://example.org/ns1'>
234 * <ns1:element><child1/></ns1:element>
235 * </iq>
236 *
237 * The default namespace of all nodes (including 'child1') is "jabber:client",
238 * though the namespace for 'element' is "http://example.org/ns1".
239 *
240 * @param node The node for which to return the default namespace
241 * @return The default namespace of this node
242 */
243 const char *xmlnode_get_default_namespace(const xmlnode *node);
225 244
226 /** 245 /**
227 * Sets the prefix of a node 246 * Sets the prefix of a node
228 * 247 *
229 * @param node The node to qualify 248 * @param node The node to qualify