Mercurial > pidgin
comparison libpurple/xmlnode.c @ 24967:adf153852bcf
propagate from branch 'im.pidgin.pidgin' (head df86c6f1de324e87828356aa8d5c369abd533b58)
to branch 'im.pidgin.pidgin.vv' (head 5bf87e309f2fee61842cccf4992de4866349570c)
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Mon, 24 Nov 2008 10:59:08 +0000 |
parents | e23b447aa5ca 4152b5c1c051 |
children | f0c2e27c7ae7 |
comparison
equal
deleted
inserted
replaced
24966:bee5ab815291 | 24967:adf153852bcf |
---|---|
247 xmlnode_get_attrib(xmlnode *node, const char *attr) | 247 xmlnode_get_attrib(xmlnode *node, const char *attr) |
248 { | 248 { |
249 xmlnode *x; | 249 xmlnode *x; |
250 | 250 |
251 g_return_val_if_fail(node != NULL, NULL); | 251 g_return_val_if_fail(node != NULL, NULL); |
252 g_return_val_if_fail(attr != NULL, NULL); | |
252 | 253 |
253 for(x = node->child; x; x = x->next) { | 254 for(x = node->child; x; x = x->next) { |
254 if(x->type == XMLNODE_TYPE_ATTRIB && !strcmp(attr, x->name)) { | 255 if(x->type == XMLNODE_TYPE_ATTRIB && !strcmp(attr, x->name)) { |
255 return x->data; | 256 return x->data; |
256 } | 257 } |
263 xmlnode_get_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns) | 264 xmlnode_get_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns) |
264 { | 265 { |
265 xmlnode *x; | 266 xmlnode *x; |
266 | 267 |
267 g_return_val_if_fail(node != NULL, NULL); | 268 g_return_val_if_fail(node != NULL, NULL); |
269 g_return_val_if_fail(attr != NULL, NULL); | |
268 | 270 |
269 for(x = node->child; x; x = x->next) { | 271 for(x = node->child; x; x = x->next) { |
270 if(x->type == XMLNODE_TYPE_ATTRIB && | 272 if(x->type == XMLNODE_TYPE_ATTRIB && |
271 !strcmp(attr, x->name) && | 273 !strcmp(attr, x->name) && |
272 _xmlnode_compare_xmlns(xmlns, x->xmlns)) { | 274 _xmlnode_compare_xmlns(xmlns, x->xmlns)) { |