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()
185 xmlNsPtr attr_find_ns(xmlAttrPtr node) in attr_find_ns() argument
187 if (node->ns) { in attr_find_ns()
188 return node->ns; in attr_find_ns()
189 } else if (node->parent->ns) { in attr_find_ns()
190 return node->parent->ns; in attr_find_ns()
192 return xmlSearchNs(node->doc, node->parent, NULL); in attr_find_ns()
196 xmlNsPtr node_find_ns(xmlNodePtr node) in node_find_ns() argument
198 if (node->ns) { in node_find_ns()
199 return node->ns; in node_find_ns()
201 return xmlSearchNs(node->doc, node, NULL); in node_find_ns()
205 int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns) in attr_is_equal_ex() argument
207 if (name == NULL || strcmp((char*)node->name, name) == 0) { in attr_is_equal_ex()
209 xmlNsPtr nsPtr = attr_find_ns(node); in attr_is_equal_ex()
221 int node_is_equal_ex(xmlNodePtr node, char *name, char *ns) in node_is_equal_ex() argument
223 if (name == NULL || strcmp((char*)node->name, name) == 0) { in node_is_equal_ex()
225 xmlNsPtr nsPtr = node_find_ns(node); in node_is_equal_ex()
238 xmlAttrPtr get_attribute_ex(xmlAttrPtr node, char *name, char *ns) in get_attribute_ex() argument
240 while (node!=NULL) { in get_attribute_ex()
241 if (attr_is_equal_ex(node, name, ns)) { in get_attribute_ex()
242 return node; in get_attribute_ex()
244 node = node->next; in get_attribute_ex()
249 xmlNodePtr get_node_ex(xmlNodePtr node, char *name, char *ns) in get_node_ex() argument
251 while (node!=NULL) { in get_node_ex()
252 if (node_is_equal_ex(node, name, ns)) { in get_node_ex()
253 return node; in get_node_ex()
255 node = node->next; in get_node_ex()
260 xmlNodePtr get_node_recurisve_ex(xmlNodePtr node, char *name, char *ns) in get_node_recurisve_ex() argument
262 while (node != NULL) { in get_node_recurisve_ex()
263 if (node_is_equal_ex(node, name, ns)) { in get_node_recurisve_ex()
264 return node; in get_node_recurisve_ex()
265 } else if (node->children != NULL) { in get_node_recurisve_ex()
266 xmlNodePtr tmp = get_node_recurisve_ex(node->children, name, ns); in get_node_recurisve_ex()
271 node = node->next; in get_node_recurisve_ex()
276 xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, … in get_node_with_attribute_ex() argument
280 while (node != NULL) { in get_node_with_attribute_ex()
282 node = get_node_ex(node, name, name_ns); in get_node_with_attribute_ex()
283 if (node==NULL) { in get_node_with_attribute_ex()
288 attr = get_attribute_ex(node->properties, attribute, attr_ns); in get_node_with_attribute_ex()
290 return node; in get_node_with_attribute_ex()
292 node = node->next; in get_node_with_attribute_ex()
297 xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *a… in get_node_with_attribute_recursive_ex() argument
299 while (node != NULL) { in get_node_with_attribute_recursive_ex()
300 if (node_is_equal_ex(node, name, name_ns)) { in get_node_with_attribute_recursive_ex()
301 xmlAttrPtr attr = get_attribute_ex(node->properties, attribute, attr_ns); in get_node_with_attribute_recursive_ex()
303 return node; in get_node_with_attribute_recursive_ex()
306 if (node->children != NULL) { in get_node_with_attribute_recursive_ex()
307 …xmlNodePtr tmp = get_node_with_attribute_recursive_ex(node->children, name, name_ns, attribute, va… in get_node_with_attribute_recursive_ex()
312 node = node->next; in get_node_with_attribute_recursive_ex()