Lines Matching refs:node
42 static void cleanup_xml_node(xmlNodePtr node) in cleanup_xml_node() argument
47 trav = node->children; in cleanup_xml_node()
209 xmlNsPtr attr_find_ns(xmlAttrPtr node) in attr_find_ns() argument
211 if (node->ns) { in attr_find_ns()
212 return node->ns; in attr_find_ns()
213 } else if (node->parent->ns) { in attr_find_ns()
214 return node->parent->ns; in attr_find_ns()
216 return xmlSearchNs(node->doc, node->parent, NULL); in attr_find_ns()
220 xmlNsPtr node_find_ns(xmlNodePtr node) in node_find_ns() argument
222 if (node->ns) { in node_find_ns()
223 return node->ns; in node_find_ns()
225 return xmlSearchNs(node->doc, node, NULL); in node_find_ns()
229 int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns) in attr_is_equal_ex() argument
231 if (name == NULL || strcmp((char*)node->name, name) == 0) { in attr_is_equal_ex()
233 xmlNsPtr nsPtr = attr_find_ns(node); in attr_is_equal_ex()
245 int node_is_equal_ex(xmlNodePtr node, char *name, char *ns) in node_is_equal_ex() argument
247 if (name == NULL || strcmp((char*)node->name, name) == 0) { in node_is_equal_ex()
249 xmlNsPtr nsPtr = node_find_ns(node); in node_is_equal_ex()
262 xmlAttrPtr get_attribute_ex(xmlAttrPtr node, char *name, char *ns) in get_attribute_ex() argument
264 while (node!=NULL) { in get_attribute_ex()
265 if (attr_is_equal_ex(node, name, ns)) { in get_attribute_ex()
266 return node; in get_attribute_ex()
268 node = node->next; in get_attribute_ex()
273 xmlNodePtr get_node_ex(xmlNodePtr node, char *name, char *ns) in get_node_ex() argument
275 while (node!=NULL) { in get_node_ex()
276 if (node_is_equal_ex(node, name, ns)) { in get_node_ex()
277 return node; in get_node_ex()
279 node = node->next; in get_node_ex()
284 xmlNodePtr get_node_recurisve_ex(xmlNodePtr node, char *name, char *ns) in get_node_recurisve_ex() argument
286 while (node != NULL) { in get_node_recurisve_ex()
287 if (node_is_equal_ex(node, name, ns)) { in get_node_recurisve_ex()
288 return node; in get_node_recurisve_ex()
289 } else if (node->children != NULL) { in get_node_recurisve_ex()
290 xmlNodePtr tmp = get_node_recurisve_ex(node->children, name, ns); in get_node_recurisve_ex()
295 node = node->next; in get_node_recurisve_ex()
300 xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, … in get_node_with_attribute_ex() argument
304 while (node != NULL) { in get_node_with_attribute_ex()
306 node = get_node_ex(node, name, name_ns); in get_node_with_attribute_ex()
307 if (node==NULL) { in get_node_with_attribute_ex()
312 attr = get_attribute_ex(node->properties, attribute, attr_ns); in get_node_with_attribute_ex()
314 return node; in get_node_with_attribute_ex()
316 node = node->next; in get_node_with_attribute_ex()
321 xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *a… in get_node_with_attribute_recursive_ex() argument
323 while (node != NULL) { in get_node_with_attribute_recursive_ex()
324 if (node_is_equal_ex(node, name, name_ns)) { in get_node_with_attribute_recursive_ex()
325 xmlAttrPtr attr = get_attribute_ex(node->properties, attribute, attr_ns); in get_node_with_attribute_recursive_ex()
327 return node; in get_node_with_attribute_recursive_ex()
330 if (node->children != NULL) { in get_node_with_attribute_recursive_ex()
331 …xmlNodePtr tmp = get_node_with_attribute_recursive_ex(node->children, name, name_ns, attribute, va… in get_node_with_attribute_recursive_ex()
336 node = node->next; in get_node_with_attribute_recursive_ex()