Lines Matching refs:node
39 static void cleanup_xml_node(xmlNodePtr node) in cleanup_xml_node() argument
44 trav = node->children; in cleanup_xml_node()
186 xmlNsPtr attr_find_ns(xmlAttrPtr node) in attr_find_ns() argument
188 if (node->ns) { in attr_find_ns()
189 return node->ns; in attr_find_ns()
190 } else if (node->parent->ns) { in attr_find_ns()
191 return node->parent->ns; in attr_find_ns()
193 return xmlSearchNs(node->doc, node->parent, NULL); in attr_find_ns()
197 xmlNsPtr node_find_ns(xmlNodePtr node) in node_find_ns() argument
199 if (node->ns) { in node_find_ns()
200 return node->ns; in node_find_ns()
202 return xmlSearchNs(node->doc, node, NULL); in node_find_ns()
206 int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns) in attr_is_equal_ex() argument
208 if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) { in attr_is_equal_ex()
210 xmlNsPtr nsPtr = attr_find_ns(node); in attr_is_equal_ex()
222 int node_is_equal_ex(xmlNodePtr node, char *name, char *ns) in node_is_equal_ex() argument
224 if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) { in node_is_equal_ex()
226 xmlNsPtr nsPtr = node_find_ns(node); in node_is_equal_ex()
239 xmlAttrPtr get_attribute_ex(xmlAttrPtr node, char *name, char *ns) in get_attribute_ex() argument
241 while (node!=NULL) { in get_attribute_ex()
242 if (attr_is_equal_ex(node, name, ns)) { in get_attribute_ex()
243 return node; in get_attribute_ex()
245 node = node->next; in get_attribute_ex()
250 xmlNodePtr get_node_ex(xmlNodePtr node, char *name, char *ns) in get_node_ex() argument
252 while (node!=NULL) { in get_node_ex()
253 if (node_is_equal_ex(node, name, ns)) { in get_node_ex()
254 return node; in get_node_ex()
256 node = node->next; in get_node_ex()
261 xmlNodePtr get_node_recurisve_ex(xmlNodePtr node, char *name, char *ns) in get_node_recurisve_ex() argument
263 while (node != NULL) { in get_node_recurisve_ex()
264 if (node_is_equal_ex(node, name, ns)) { in get_node_recurisve_ex()
265 return node; in get_node_recurisve_ex()
266 } else if (node->children != NULL) { in get_node_recurisve_ex()
267 xmlNodePtr tmp = get_node_recurisve_ex(node->children, name, ns); in get_node_recurisve_ex()
272 node = node->next; in get_node_recurisve_ex()
277 xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, … in get_node_with_attribute_ex() argument
281 while (node != NULL) { in get_node_with_attribute_ex()
283 node = get_node_ex(node, name, name_ns); in get_node_with_attribute_ex()
284 if (node==NULL) { in get_node_with_attribute_ex()
289 attr = get_attribute_ex(node->properties, attribute, attr_ns); in get_node_with_attribute_ex()
291 return node; in get_node_with_attribute_ex()
293 node = node->next; in get_node_with_attribute_ex()
298 xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *a… in get_node_with_attribute_recursive_ex() argument
300 while (node != NULL) { in get_node_with_attribute_recursive_ex()
301 if (node_is_equal_ex(node, name, name_ns)) { in get_node_with_attribute_recursive_ex()
302 xmlAttrPtr attr = get_attribute_ex(node->properties, attribute, attr_ns); in get_node_with_attribute_recursive_ex()
304 return node; in get_node_with_attribute_recursive_ex()
307 if (node->children != NULL) { in get_node_with_attribute_recursive_ex()
308 …xmlNodePtr tmp = get_node_with_attribute_recursive_ex(node->children, name, name_ns, attribute, va… in get_node_with_attribute_recursive_ex()
313 node = node->next; in get_node_with_attribute_recursive_ex()