comparison src/xmlnode.c @ 10736:703f722d076f

[gaim-migrate @ 12338] Change 2 parameters to "const" committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 26 Mar 2005 19:13:15 +0000
parents 9903182f2aac
children 98de05966d6d
comparison
equal deleted inserted replaced
10735:a0edd89ddb83 10736:703f722d076f
184 g_free(node->data); 184 g_free(node->data);
185 g_free(node); 185 g_free(node);
186 } 186 }
187 187
188 xmlnode* 188 xmlnode*
189 xmlnode_get_child_with_namespace(xmlnode *parent, const char *name, const char *ns) 189 xmlnode_get_child(const xmlnode *parent, const char *name)
190 {
191 return xmlnode_get_child_with_namespace(parent, name, NULL);
192 }
193
194 xmlnode *
195 xmlnode_get_child_with_namespace(const xmlnode *parent, const char *name, const char *ns)
190 { 196 {
191 xmlnode *x, *ret = NULL; 197 xmlnode *x, *ret = NULL;
192 char **names; 198 char **names;
193 char *parent_name, *child_name; 199 char *parent_name, *child_name;
194 200
213 if(child_name && ret) 219 if(child_name && ret)
214 ret = xmlnode_get_child(ret, child_name); 220 ret = xmlnode_get_child(ret, child_name);
215 221
216 g_strfreev(names); 222 g_strfreev(names);
217 return ret; 223 return ret;
218 }
219
220 xmlnode*
221 xmlnode_get_child(xmlnode *parent, const char *name)
222 {
223 return xmlnode_get_child_with_namespace(parent, name, NULL);
224 } 224 }
225 225
226 char * 226 char *
227 xmlnode_get_data(xmlnode *node) 227 xmlnode_get_data(xmlnode *node)
228 { 228 {