Lines Matching refs:node
54 static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data);
65 static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, cha… in _node_as_zval() argument
81 php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL); in _node_as_zval()
88 if ((__s)->node && (__s)->node->node) { \
89 __n = (__s)->node->node; \
96 static xmlNodePtr php_sxe_get_first_node(php_sxe_object *sxe, xmlNodePtr node) /* {{{ */ in php_sxe_get_first_node() argument
109 return node; in php_sxe_get_first_node()
114 static inline int match_ns(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name, int prefix) /* {{{ … in match_ns() argument
116 if (name == NULL && (node->ns == NULL || node->ns->prefix == NULL)) { in match_ns()
120 if (node->ns && !xmlStrcmp(prefix ? node->ns->prefix : node->ns->href, name)) { in match_ns()
128 static xmlNodePtr sxe_get_element_by_offset(php_sxe_object *sxe, zend_long offset, xmlNodePtr node,… in sxe_get_element_by_offset() argument
137 return node; in sxe_get_element_by_offset()
142 while (node && nodendx <= offset) { in sxe_get_element_by_offset()
143 SKIP_TEXT(node) in sxe_get_element_by_offset()
144 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_get_element_by_offset()
146 sxe->iter.type == SXE_ITER_ELEMENT && !xmlStrcmp(node->name, sxe->iter.name))) { in sxe_get_element_by_offset()
154 node = node->next; in sxe_get_element_by_offset()
161 return node; in sxe_get_element_by_offset()
165 static xmlNodePtr sxe_find_element_by_name(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name) /* … in sxe_find_element_by_name() argument
167 while (node) { in sxe_find_element_by_name()
168 SKIP_TEXT(node) in sxe_find_element_by_name()
169 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_find_element_by_name()
170 if (!xmlStrcmp(node->name, name)) { in sxe_find_element_by_name()
171 return node; in sxe_find_element_by_name()
175 node = node->next; in sxe_find_element_by_name()
180 static xmlNodePtr sxe_get_element_by_name(php_sxe_object *sxe, xmlNodePtr node, char **name, SXE_IT… in sxe_get_element_by_name() argument
183 xmlNodePtr orgnode = node; in sxe_get_element_by_name()
192 node = php_sxe_get_first_node(sxe, node); in sxe_get_element_by_name()
197 orgnode = sxe_find_element_by_name(sxe, node, sxe->iter.name); in sxe_get_element_by_name()
201 node = orgnode->children; in sxe_get_element_by_name()
204 while (node) { in sxe_get_element_by_name()
205 SKIP_TEXT(node) in sxe_get_element_by_name()
206 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_get_element_by_name()
207 if (!xmlStrcmp(node->name, (xmlChar *)*name)) { in sxe_get_element_by_name()
213 retnode = node; in sxe_get_element_by_name()
217 node = node->next; in sxe_get_element_by_name()
237 xmlNodePtr node; in sxe_prop_dim_read() local
270 GET_NODE(sxe, node); in sxe_prop_dim_read()
275 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
276 attr = (xmlAttrPtr)node; in sxe_prop_dim_read()
279 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
280 attr = node ? node->properties : NULL; in sxe_prop_dim_read()
282 if (!member && node && node->parent && in sxe_prop_dim_read()
283 node->parent->type == XML_DOCUMENT_NODE) { in sxe_prop_dim_read()
292 if (node) { in sxe_prop_dim_read()
319 if (!sxe->node) { in sxe_prop_dim_read()
320 php_libxml_increment_node_ptr((php_libxml_node_object *)sxe, node, NULL); in sxe_prop_dim_read()
324 xmlNodePtr mynode = node; in sxe_prop_dim_read()
327 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
334 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, &cnt); in sxe_prop_dim_read()
336 node = NULL; in sxe_prop_dim_read()
338 if (node) { in sxe_prop_dim_read()
339 _node_as_zval(sxe, node, rv, SXE_ITER_NONE, NULL, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
344 node = xmlNewTextChild(mynode->parent, mynode->ns, mynode->name, NULL); in sxe_prop_dim_read()
345 _node_as_zval(sxe, node, rv, SXE_ITER_NONE, NULL, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
349 if (type != BP_VAR_IS || sxe_find_element_by_name(sxe, node->children, (xmlChar *) name)) { in sxe_prop_dim_read()
350 _node_as_zval(sxe, node, rv, SXE_ITER_ELEMENT, name, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
386 static void change_node_zval(xmlNodePtr node, zval *value) in change_node_zval() argument
394 xmlNodeSetContentLen(node, (xmlChar *)"", 0); in change_node_zval()
411 buffer = xmlEncodeEntitiesReentrant(node->doc, (xmlChar *)Z_STRVAL_P(value)); in change_node_zval()
415 xmlNodeSetContentLen(node, buffer, buffer_len); in change_node_zval()
434 xmlNodePtr node; in sxe_prop_dim_write() local
487 GET_NODE(sxe, node); in sxe_prop_dim_write()
492 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_write()
493 attr = (xmlAttrPtr)node; in sxe_prop_dim_write()
496 mynode = node; in sxe_prop_dim_write()
497 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_write()
498 attr = node ? node->properties : NULL; in sxe_prop_dim_write()
500 if (!member && node && node->parent && in sxe_prop_dim_write()
501 node->parent->type == XML_DOCUMENT_NODE) { in sxe_prop_dim_write()
509 if (attribs && !node && sxe->iter.type == SXE_ITER_ELEMENT) { in sxe_prop_dim_write()
510 node = xmlNewChild(mynode, mynode->ns, sxe->iter.name, NULL); in sxe_prop_dim_write()
511 attr = node->properties; in sxe_prop_dim_write()
515 mynode = node; in sxe_prop_dim_write()
549 if (node) { in sxe_prop_dim_write()
578 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_prop_dim_write()
587 newnode = node; in sxe_prop_dim_write()
594 newnode = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, &cnt); in sxe_prop_dim_write()
600 node = node->children; in sxe_prop_dim_write()
601 while (node) { in sxe_prop_dim_write()
602 SKIP_TEXT(node); in sxe_prop_dim_write()
604 …if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefi… in sxe_prop_dim_write()
605 newnode = node; in sxe_prop_dim_write()
610 node = node->next; in sxe_prop_dim_write()
630 if (!node) { in sxe_prop_dim_write()
648 …newnode = (xmlNodePtr)xmlNewProp(node, (xmlChar *)Z_STRVAL_P(member), value ? (xmlChar *)Z_STRVAL_… in sxe_prop_dim_write()
685 xmlNodePtr node; in sxe_property_get_adr() local
692 GET_NODE(sxe, node); in sxe_property_get_adr()
695 node = sxe_get_element_by_name(sxe, node, &name, &type); in sxe_property_get_adr()
696 if (node) { in sxe_property_get_adr()
699 if (sxe_prop_dim_write(object, member, NULL, 1, 0, &node) != SUCCESS) { in sxe_property_get_adr()
705 _node_as_zval(sxe, node, &ret, type, name, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_property_get_adr()
722 xmlNodePtr node; in sxe_prop_dim_exists() local
735 GET_NODE(sxe, node); in sxe_prop_dim_exists()
742 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
750 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
751 attr = (xmlAttrPtr)node; in sxe_prop_dim_exists()
754 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
755 attr = node ? node->properties : NULL; in sxe_prop_dim_exists()
759 if (node) { in sxe_prop_dim_exists()
794 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
796 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, NULL); in sxe_prop_dim_exists()
798 node = sxe_find_element_by_name(sxe, node->children, (xmlChar *)Z_STRVAL_P(member)); in sxe_prop_dim_exists()
800 if (node) { in sxe_prop_dim_exists()
803 (!node->children || (node->children->type == XML_TEXT_NODE && !node->children->next && in sxe_prop_dim_exists()
804 …(!node->children->content || !node->children->content[0] || !xmlStrcmp(node->children->content, (c… in sxe_prop_dim_exists()
840 xmlNodePtr node; in sxe_prop_dim_delete() local
854 GET_NODE(sxe, node); in sxe_prop_dim_delete()
861 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
869 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
870 attr = (xmlAttrPtr)node; in sxe_prop_dim_delete()
873 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
874 attr = node ? node->properties : NULL; in sxe_prop_dim_delete()
878 if (node) { in sxe_prop_dim_delete()
910 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
912 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, NULL); in sxe_prop_dim_delete()
913 if (node) { in sxe_prop_dim_delete()
914 xmlUnlinkNode(node); in sxe_prop_dim_delete()
915 php_libxml_node_free_resource(node); in sxe_prop_dim_delete()
918 node = node->children; in sxe_prop_dim_delete()
919 while (node) { in sxe_prop_dim_delete()
920 nnext = node->next; in sxe_prop_dim_delete()
922 SKIP_TEXT(node); in sxe_prop_dim_delete()
924 …if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefi… in sxe_prop_dim_delete()
925 xmlUnlinkNode(node); in sxe_prop_dim_delete()
926 php_libxml_node_free_resource(node); in sxe_prop_dim_delete()
930 node = nnext; in sxe_prop_dim_delete()
976 static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval *value, xmlChar *ns… in _get_base_node_value() argument
981 if (node->children && node->children->type == XML_TEXT_NODE && !xmlIsBlankNode(node->children)) { in _get_base_node_value()
982 contents = xmlNodeListGetString(node->doc, node->children, 1); in _get_base_node_value()
995 php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL); in _get_base_node_value()
1029 xmlNodePtr node; in sxe_prop_is_empty() local
1037 GET_NODE(sxe, node); in sxe_prop_is_empty()
1038 if (!node) { in sxe_prop_is_empty()
1043 node = php_sxe_get_first_node(sxe, node); in sxe_prop_is_empty()
1045 if (!node || node->type != XML_ENTITY_DECL) { in sxe_prop_is_empty()
1046 attr = node ? (xmlAttrPtr)node->properties : NULL; in sxe_prop_is_empty()
1056 GET_NODE(sxe, node); in sxe_prop_is_empty()
1057 node = php_sxe_get_first_node(sxe, node); in sxe_prop_is_empty()
1060 if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { in sxe_prop_is_empty()
1061 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_prop_is_empty()
1064 …SXE_ITER_NONE || !node->children || !node->parent || node->children->next || node->children->child… in sxe_prop_is_empty()
1065 node = node->children; in sxe_prop_is_empty()
1069 node = php_sxe_reset_iterator(sxe, 0); in sxe_prop_is_empty()
1073 while (node) { in sxe_prop_is_empty()
1074 if (node->children != NULL || node->prev != NULL || node->next != NULL) { in sxe_prop_is_empty()
1075 SKIP_TEXT(node); in sxe_prop_is_empty()
1077 if (node->type == XML_TEXT_NODE) { in sxe_prop_is_empty()
1078 const xmlChar *cur = node->content; in sxe_prop_is_empty()
1087 …if (node->type == XML_ELEMENT_NODE && (! match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefi… in sxe_prop_is_empty()
1091 if (!node->name) { in sxe_prop_is_empty()
1099 node = php_sxe_iterator_fetch(sxe, node->next, 0); in sxe_prop_is_empty()
1101 node = node->next; in sxe_prop_is_empty()
1124 xmlNodePtr node; in sxe_get_prop_hash() local
1147 GET_NODE(sxe, node); in sxe_get_prop_hash()
1148 if (!node) { in sxe_get_prop_hash()
1153 node = php_sxe_get_first_node(sxe, node); in sxe_get_prop_hash()
1155 if (!node || node->type != XML_ENTITY_DECL) { in sxe_get_prop_hash()
1156 attr = node ? (xmlAttrPtr)node->properties : NULL; in sxe_get_prop_hash()
1174 GET_NODE(sxe, node); in sxe_get_prop_hash()
1175 node = php_sxe_get_first_node(sxe, node); in sxe_get_prop_hash()
1177 if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { in sxe_get_prop_hash()
1178 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_get_prop_hash()
1179 ZVAL_STR(&value, sxe_xmlNodeListGetString(node->doc, node->children, 1)); in sxe_get_prop_hash()
1181 node = NULL; in sxe_get_prop_hash()
1184 …_NONE || !node->children || !node->parent || !node->next || node->children->next || node->children… in sxe_get_prop_hash()
1185 node = node->children; in sxe_get_prop_hash()
1190 node = php_sxe_reset_iterator(sxe, 0); in sxe_get_prop_hash()
1196 while (node) { in sxe_get_prop_hash()
1197 if (node->children != NULL || node->prev != NULL || node->next != NULL) { in sxe_get_prop_hash()
1198 SKIP_TEXT(node); in sxe_get_prop_hash()
1200 if (node->type == XML_TEXT_NODE) { in sxe_get_prop_hash()
1201 const xmlChar *cur = node->content; in sxe_get_prop_hash()
1204 ZVAL_STR(&value, sxe_xmlNodeListGetString(node->doc, node, 1)); in sxe_get_prop_hash()
1211 …if (node->type == XML_ELEMENT_NODE && (! match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefi… in sxe_get_prop_hash()
1215 name = (char *) node->name; in sxe_get_prop_hash()
1219 namelen = xmlStrlen(node->name); in sxe_get_prop_hash()
1222 _get_base_node_value(sxe, node, &value, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_get_prop_hash()
1231 node = php_sxe_iterator_fetch(sxe, node->next, 0); in sxe_get_prop_hash()
1233 node = node->next; in sxe_get_prop_hash()
1280 if (sxe1->node == NULL) { in sxe_objects_compare()
1281 if (sxe2->node) { in sxe_objects_compare()
1287 return !(sxe1->node == sxe2->node); in sxe_objects_compare()
1321 if (!sxe->node) { in SXE_METHOD()
1323 if (!sxe->node) { in SXE_METHOD()
1328 nodeptr = php_sxe_get_first_node(sxe, sxe->node->node); in SXE_METHOD()
1330 sxe->xpath->node = nodeptr; in SXE_METHOD()
1413 xmlNodePtr node; in SXE_METHOD() local
1430 GET_NODE(sxe, node); in SXE_METHOD()
1431 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1433 if (node) { in SXE_METHOD()
1434 if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { in SXE_METHOD()
1449 xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, NULL); in SXE_METHOD()
1459 GET_NODE(sxe, node); in SXE_METHOD()
1460 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1462 if (node) { in SXE_METHOD()
1463 if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { in SXE_METHOD()
1481 …xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, (const char *) ((xmlDocPtr) … in SXE_METHOD()
1519 static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *ret… in sxe_add_namespaces() argument
1523 if (node->ns) { in sxe_add_namespaces()
1524 sxe_add_namespace_name(return_value, node->ns); in sxe_add_namespaces()
1527 attr = node->properties; in sxe_add_namespaces()
1536 node = node->children; in sxe_add_namespaces()
1537 while (node) { in sxe_add_namespaces()
1538 if (node->type == XML_ELEMENT_NODE) { in sxe_add_namespaces()
1539 sxe_add_namespaces(sxe, node, recursive, return_value); in sxe_add_namespaces()
1541 node = node->next; in sxe_add_namespaces()
1552 xmlNodePtr node; in SXE_METHOD() local
1561 GET_NODE(sxe, node); in SXE_METHOD()
1562 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1564 if (node) { in SXE_METHOD()
1565 if (node->type == XML_ELEMENT_NODE) { in SXE_METHOD()
1566 sxe_add_namespaces(sxe, node, recursive, return_value); in SXE_METHOD()
1567 } else if (node->type == XML_ATTRIBUTE_NODE && node->ns) { in SXE_METHOD()
1568 sxe_add_namespace_name(return_value, node->ns); in SXE_METHOD()
1574 static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive… in sxe_add_registered_namespaces() argument
1578 if (node->type == XML_ELEMENT_NODE) { in sxe_add_registered_namespaces()
1579 ns = node->nsDef; in sxe_add_registered_namespaces()
1585 node = node->children; in sxe_add_registered_namespaces()
1586 while (node) { in sxe_add_registered_namespaces()
1587 sxe_add_registered_namespaces(sxe, node, recursive, return_value); in sxe_add_registered_namespaces()
1588 node = node->next; in sxe_add_registered_namespaces()
1601 xmlNodePtr node; in SXE_METHOD() local
1609 node = xmlDocGetRootElement((xmlDocPtr)sxe->document->ptr); in SXE_METHOD()
1611 GET_NODE(sxe, node); in SXE_METHOD()
1614 if (node == NULL) { in SXE_METHOD()
1619 sxe_add_registered_namespaces(sxe, node, recursive, return_value); in SXE_METHOD()
1630 xmlNodePtr node; in SXE_METHOD() local
1643 GET_NODE(sxe, node); in SXE_METHOD()
1644 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1646 _node_as_zval(sxe, node, return_value, SXE_ITER_CHILD, NULL, (xmlChar *)nsprefix, isprefix); in SXE_METHOD()
1656 xmlNodePtr node; in SXE_METHOD() local
1661 GET_NODE(sxe, node); in SXE_METHOD()
1662 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1663 if (node) { in SXE_METHOD()
1664 namelen = xmlStrlen(node->name); in SXE_METHOD()
1665 RETURN_STRINGL((char*)node->name, namelen); in SXE_METHOD()
1679 xmlNodePtr node; in SXE_METHOD() local
1687 GET_NODE(sxe, node); in SXE_METHOD()
1693 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1695 _node_as_zval(sxe, node, return_value, SXE_ITER_ATTRLIST, NULL, (xmlChar *)nsprefix, isprefix); in SXE_METHOD()
1706 xmlNodePtr node, newnode; in SXE_METHOD() local
1721 GET_NODE(sxe, node); in SXE_METHOD()
1728 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1730 if (node == NULL) { in SXE_METHOD()
1740 newnode = xmlNewChild(node, NULL, localname, (xmlChar *)value); in SXE_METHOD()
1747 nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri); in SXE_METHOD()
1771 xmlNodePtr node; in SXE_METHOD() local
1787 GET_NODE(sxe, node); in SXE_METHOD()
1789 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1791 if (node && node->type != XML_ELEMENT_NODE) { in SXE_METHOD()
1792 node = node->parent; in SXE_METHOD()
1795 if (node == NULL) { in SXE_METHOD()
1812 attrp = xmlHasNsProp(node, localname, (xmlChar *)nsuri); in SXE_METHOD()
1823 nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri); in SXE_METHOD()
1825 nsptr = xmlNewNs(node, (xmlChar *)nsuri, prefix); in SXE_METHOD()
1829 attrp = xmlNewNsProp(node, nsptr, localname, (xmlChar *)value); in SXE_METHOD()
1874 xmlNodePtr node; in sxe_object_cast_ex() local
1880 node = php_sxe_get_first_node(sxe, NULL); in sxe_object_cast_ex()
1881 if (node) { in sxe_object_cast_ex()
1890 node = php_sxe_get_first_node(sxe, NULL); in sxe_object_cast_ex()
1891 if (node) { in sxe_object_cast_ex()
1892 contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, node->children, 1); in sxe_object_cast_ex()
1895 if (!sxe->node) { in sxe_object_cast_ex()
1901 if (sxe->node && sxe->node->node) { in sxe_object_cast_ex()
1902 if (sxe->node->node->children) { in sxe_object_cast_ex()
1903 contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, sxe->node->node->children, 1); in sxe_object_cast_ex()
1948 xmlNodePtr node; in php_sxe_count_elements_helper() local
1956 node = php_sxe_reset_iterator(sxe, 0); in php_sxe_count_elements_helper()
1958 while (node) in php_sxe_count_elements_helper()
1961 node = php_sxe_iterator_fetch(sxe, node->next, 0); in php_sxe_count_elements_helper()
2074 if (sxe->node) { in sxe_object_clone()
2075 nodep = xmlDocCopyNode(sxe->node->node, docp, 1); in sxe_object_clone()
2350 static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data) /* {{{… in php_sxe_iterator_fetch() argument
2357 while (node) { in php_sxe_iterator_fetch()
2358 if (node->type == XML_ATTRIBUTE_NODE) { in php_sxe_iterator_fetch()
2359 if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2363 node = node->next; in php_sxe_iterator_fetch()
2366 while (node) { in php_sxe_iterator_fetch()
2367 if (node->type == XML_ATTRIBUTE_NODE) { in php_sxe_iterator_fetch()
2368 if (match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2372 node = node->next; in php_sxe_iterator_fetch()
2376 while (node) { in php_sxe_iterator_fetch()
2377 if (node->type == XML_ELEMENT_NODE) { in php_sxe_iterator_fetch()
2378 if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2382 node = node->next; in php_sxe_iterator_fetch()
2385 while (node) { in php_sxe_iterator_fetch()
2386 if (node->type == XML_ELEMENT_NODE) { in php_sxe_iterator_fetch()
2387 if (match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2391 node = node->next; in php_sxe_iterator_fetch()
2395 if (node && use_data) { in php_sxe_iterator_fetch()
2396 _node_as_zval(sxe, node, &sxe->iter.data, SXE_ITER_NONE, NULL, prefix, isprefix); in php_sxe_iterator_fetch()
2399 return node; in php_sxe_iterator_fetch()
2405 xmlNodePtr node; in php_sxe_reset_iterator() local
2412 GET_NODE(sxe, node) in php_sxe_reset_iterator()
2414 if (node) { in php_sxe_reset_iterator()
2419 node = node->children; in php_sxe_reset_iterator()
2422 node = (xmlNodePtr) node->properties; in php_sxe_reset_iterator()
2424 return php_sxe_iterator_fetch(sxe, node, use_data); in php_sxe_reset_iterator()
2482 if (intern != NULL && intern->node != NULL) { in php_sxe_iterator_current_key()
2483 curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->node)->node; in php_sxe_iterator_current_key()
2496 xmlNodePtr node = NULL; in php_sxe_move_forward_iterator() local
2501 GET_NODE(intern, node) in php_sxe_move_forward_iterator()
2506 if (node) { in php_sxe_move_forward_iterator()
2507 php_sxe_iterator_fetch(sxe, node->next, 1); in php_sxe_move_forward_iterator()
2533 xmlNodePtr node; in simplexml_export_node() local
2536 GET_NODE(sxe, node); in simplexml_export_node()
2537 return php_sxe_get_first_node(sxe, node); in simplexml_export_node()
2546 zval *node; in PHP_FUNCTION() local
2552 if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|C!", &node, &ce) == FAILURE) { in PHP_FUNCTION()
2556 object = Z_LIBXML_NODE_P(node); in PHP_FUNCTION()
2558 nodep = php_libxml_import_node(node); in PHP_FUNCTION()
2608 ZEND_ARG_INFO(0, node)