Lines Matching refs:node

49 static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data);
59 static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, cha… in _node_as_zval() argument
75 php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL); in _node_as_zval()
81 static xmlNodePtr php_sxe_get_first_node(php_sxe_object *sxe, xmlNodePtr node) in php_sxe_get_first_node() argument
86 return node; in php_sxe_get_first_node()
90 static inline int match_ns(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name, int prefix) /* {{{ … in match_ns() argument
92 if (name == NULL && (node->ns == NULL || node->ns->prefix == NULL)) { in match_ns()
96 if (node->ns && !xmlStrcmp(prefix ? node->ns->prefix : node->ns->href, name)) { in match_ns()
104 static xmlNodePtr sxe_get_element_by_offset(php_sxe_object *sxe, zend_long offset, xmlNodePtr node,… in sxe_get_element_by_offset() argument
113 return node; in sxe_get_element_by_offset()
118 while (node && nodendx <= offset) { in sxe_get_element_by_offset()
119 SKIP_TEXT(node) in sxe_get_element_by_offset()
120 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_get_element_by_offset()
122 sxe->iter.type == SXE_ITER_ELEMENT && !xmlStrcmp(node->name, sxe->iter.name))) { in sxe_get_element_by_offset()
130 node = node->next; in sxe_get_element_by_offset()
137 return node; in sxe_get_element_by_offset()
141 static xmlNodePtr sxe_find_element_by_name(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name) /* … in sxe_find_element_by_name() argument
143 while (node) { in sxe_find_element_by_name()
144 SKIP_TEXT(node) in sxe_find_element_by_name()
145 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_find_element_by_name()
146 if (!xmlStrcmp(node->name, name)) { in sxe_find_element_by_name()
147 return node; in sxe_find_element_by_name()
151 node = node->next; in sxe_find_element_by_name()
156 static xmlNodePtr sxe_get_element_by_name(php_sxe_object *sxe, xmlNodePtr node, char **name, SXE_IT… in sxe_get_element_by_name() argument
159 xmlNodePtr orgnode = node; in sxe_get_element_by_name()
168 node = php_sxe_get_first_node(sxe, node); in sxe_get_element_by_name()
173 orgnode = sxe_find_element_by_name(sxe, node, sxe->iter.name); in sxe_get_element_by_name()
177 node = orgnode->children; in sxe_get_element_by_name()
180 while (node) { in sxe_get_element_by_name()
181 SKIP_TEXT(node) in sxe_get_element_by_name()
182 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_get_element_by_name()
183 if (!xmlStrcmp(node->name, (xmlChar *)*name)) { in sxe_get_element_by_name()
189 retnode = node; in sxe_get_element_by_name()
193 node = node->next; in sxe_get_element_by_name()
212 xmlNodePtr node; in sxe_prop_dim_read() local
249 GET_NODE(sxe, node); in sxe_prop_dim_read()
254 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
255 attr = (xmlAttrPtr)node; in sxe_prop_dim_read()
258 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
259 attr = node ? node->properties : NULL; in sxe_prop_dim_read()
261 if (!member && node && node->parent && in sxe_prop_dim_read()
262 node->parent->type == XML_DOCUMENT_NODE) { in sxe_prop_dim_read()
271 if (node) { in sxe_prop_dim_read()
298 if (!sxe->node) { in sxe_prop_dim_read()
299 php_libxml_increment_node_ptr((php_libxml_node_object *)sxe, node, NULL); in sxe_prop_dim_read()
303 xmlNodePtr mynode = node; in sxe_prop_dim_read()
306 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
313 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, &cnt); in sxe_prop_dim_read()
315 node = NULL; in sxe_prop_dim_read()
317 if (node) { in sxe_prop_dim_read()
318 _node_as_zval(sxe, node, rv, SXE_ITER_NONE, NULL, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
323 node = xmlNewTextChild(mynode->parent, mynode->ns, mynode->name, NULL); in sxe_prop_dim_read()
324 _node_as_zval(sxe, node, rv, SXE_ITER_NONE, NULL, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
328 if (type != BP_VAR_IS || sxe_find_element_by_name(sxe, node->children, (xmlChar *) name)) { in sxe_prop_dim_read()
329 _node_as_zval(sxe, node, rv, SXE_ITER_ELEMENT, name, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
364 static void change_node_zval(xmlNodePtr node, zend_string *value) in change_node_zval() argument
366 xmlChar *buffer = xmlEncodeEntitiesReentrant(node->doc, (xmlChar *)ZSTR_VAL(value)); in change_node_zval()
369 xmlNodeSetContent(node, buffer); in change_node_zval()
379 xmlNodePtr node; in sxe_prop_dim_write() local
435 GET_NODE(sxe, node); in sxe_prop_dim_write()
440 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_write()
441 attr = (xmlAttrPtr)node; in sxe_prop_dim_write()
444 mynode = node; in sxe_prop_dim_write()
445 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_write()
446 attr = node ? node->properties : NULL; in sxe_prop_dim_write()
448 if (!member && node && node->parent && in sxe_prop_dim_write()
449 node->parent->type == XML_DOCUMENT_NODE) { in sxe_prop_dim_write()
457 if (attribs && !node && sxe->iter.type == SXE_ITER_ELEMENT) { in sxe_prop_dim_write()
458 node = xmlNewChild(mynode, mynode->ns, sxe->iter.name, NULL); in sxe_prop_dim_write()
459 attr = node->properties; in sxe_prop_dim_write()
463 mynode = node; in sxe_prop_dim_write()
496 if (node) { in sxe_prop_dim_write()
525 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_prop_dim_write()
534 newnode = node; in sxe_prop_dim_write()
541 newnode = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, &cnt); in sxe_prop_dim_write()
547 node = node->children; in sxe_prop_dim_write()
548 while (node) { in sxe_prop_dim_write()
549 SKIP_TEXT(node); in sxe_prop_dim_write()
551 …if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefi… in sxe_prop_dim_write()
552 newnode = node; in sxe_prop_dim_write()
557 node = node->next; in sxe_prop_dim_write()
577 if (!node) { in sxe_prop_dim_write()
593 …newnode = (xmlNodePtr)xmlNewProp(node, (xmlChar *)Z_STRVAL_P(member), value_str ? (xmlChar *)ZSTR_… in sxe_prop_dim_write()
631 xmlNodePtr node; in sxe_property_get_adr() local
638 GET_NODE(sxe, node); in sxe_property_get_adr()
639 if (UNEXPECTED(!node)) { in sxe_property_get_adr()
643 node = sxe_get_element_by_name(sxe, node, &name, &type); in sxe_property_get_adr()
644 if (node) { in sxe_property_get_adr()
648 if (sxe_prop_dim_write(object, &member, NULL, 1, 0, &node) == &EG(error_zval)) { in sxe_property_get_adr()
654 _node_as_zval(sxe, node, &ret, type, name, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_property_get_adr()
670 xmlNodePtr node; in sxe_prop_dim_exists() local
687 GET_NODE(sxe, node); in sxe_prop_dim_exists()
694 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
702 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
703 attr = (xmlAttrPtr)node; in sxe_prop_dim_exists()
706 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
707 attr = node ? node->properties : NULL; in sxe_prop_dim_exists()
711 if (node) { in sxe_prop_dim_exists()
746 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
748 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, NULL); in sxe_prop_dim_exists()
750 node = sxe_find_element_by_name(sxe, node->children, (xmlChar *)Z_STRVAL_P(member)); in sxe_prop_dim_exists()
752 if (node) { in sxe_prop_dim_exists()
755 (!node->children || (node->children->type == XML_TEXT_NODE && !node->children->next && in sxe_prop_dim_exists()
756 …(!node->children->content || !node->children->content[0] || !xmlStrcmp(node->children->content, (c… in sxe_prop_dim_exists()
791 xmlNodePtr node; in sxe_prop_dim_delete() local
809 GET_NODE(sxe, node); in sxe_prop_dim_delete()
816 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
824 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
825 attr = (xmlAttrPtr)node; in sxe_prop_dim_delete()
828 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
829 attr = node ? node->properties : NULL; in sxe_prop_dim_delete()
833 if (node) { in sxe_prop_dim_delete()
865 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
867 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, NULL); in sxe_prop_dim_delete()
868 if (node) { in sxe_prop_dim_delete()
869 xmlUnlinkNode(node); in sxe_prop_dim_delete()
870 php_libxml_node_free_resource(node); in sxe_prop_dim_delete()
873 node = node->children; in sxe_prop_dim_delete()
874 while (node) { in sxe_prop_dim_delete()
875 nnext = node->next; in sxe_prop_dim_delete()
877 SKIP_TEXT(node); in sxe_prop_dim_delete()
879 …if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefi… in sxe_prop_dim_delete()
880 xmlUnlinkNode(node); in sxe_prop_dim_delete()
881 php_libxml_node_free_resource(node); in sxe_prop_dim_delete()
885 node = nnext; in sxe_prop_dim_delete()
930 static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval *value, xmlChar *ns… in _get_base_node_value() argument
935 if (node->children && node->children->type == XML_TEXT_NODE && !xmlIsBlankNode(node->children)) { in _get_base_node_value()
936 contents = xmlNodeListGetString(node->doc, node->children, 1); in _get_base_node_value()
949 php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL); in _get_base_node_value()
983 xmlNodePtr node; in sxe_prop_is_empty() local
992 GET_NODE(sxe, node); in sxe_prop_is_empty()
993 if (!node) { in sxe_prop_is_empty()
998 node = php_sxe_get_first_node(sxe, node); in sxe_prop_is_empty()
1000 if (!node || node->type != XML_ENTITY_DECL) { in sxe_prop_is_empty()
1001 attr = node ? (xmlAttrPtr)node->properties : NULL; in sxe_prop_is_empty()
1011 GET_NODE(sxe, node); in sxe_prop_is_empty()
1012 node = php_sxe_get_first_node(sxe, node); in sxe_prop_is_empty()
1015 if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { in sxe_prop_is_empty()
1016 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_prop_is_empty()
1019 …SXE_ITER_NONE || !node->children || !node->parent || node->children->next || node->children->child… in sxe_prop_is_empty()
1020 node = node->children; in sxe_prop_is_empty()
1024 node = php_sxe_reset_iterator(sxe, 0); in sxe_prop_is_empty()
1029 while (node) { in sxe_prop_is_empty()
1030 if (node->children != NULL || node->prev != NULL || node->next != NULL) { in sxe_prop_is_empty()
1031 SKIP_TEXT(node); in sxe_prop_is_empty()
1033 if (node->type == XML_TEXT_NODE) { in sxe_prop_is_empty()
1034 const xmlChar *cur = node->content; in sxe_prop_is_empty()
1043 …if (node->type == XML_ELEMENT_NODE && (! match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefi… in sxe_prop_is_empty()
1047 if (!node->name) { in sxe_prop_is_empty()
1055 node = php_sxe_iterator_fetch(sxe, node->next, 0); in sxe_prop_is_empty()
1057 node = node->next; in sxe_prop_is_empty()
1080 xmlNodePtr node; in sxe_get_prop_hash() local
1101 GET_NODE(sxe, node); in sxe_get_prop_hash()
1102 if (!node) { in sxe_get_prop_hash()
1107 node = php_sxe_get_first_node(sxe, node); in sxe_get_prop_hash()
1109 if (!node || node->type != XML_ENTITY_DECL) { in sxe_get_prop_hash()
1110 attr = node ? (xmlAttrPtr)node->properties : NULL; in sxe_get_prop_hash()
1128 GET_NODE(sxe, node); in sxe_get_prop_hash()
1129 node = php_sxe_get_first_node(sxe, node); in sxe_get_prop_hash()
1131 if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { in sxe_get_prop_hash()
1132 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_get_prop_hash()
1133 ZVAL_STR(&value, sxe_xmlNodeListGetString(node->doc, node->children, 1)); in sxe_get_prop_hash()
1135 node = NULL; in sxe_get_prop_hash()
1138 …_NONE || !node->children || !node->parent || !node->next || node->children->next || node->children… in sxe_get_prop_hash()
1139 node = node->children; in sxe_get_prop_hash()
1144 node = php_sxe_reset_iterator(sxe, 0); in sxe_get_prop_hash()
1150 while (node) { in sxe_get_prop_hash()
1151 if (node->children != NULL || node->prev != NULL || node->next != NULL || xmlIsBlankNode(node)) { in sxe_get_prop_hash()
1152 SKIP_TEXT(node); in sxe_get_prop_hash()
1154 if (node->type == XML_TEXT_NODE) { in sxe_get_prop_hash()
1155 const xmlChar *cur = node->content; in sxe_get_prop_hash()
1158 ZVAL_STR(&value, sxe_xmlNodeListGetString(node->doc, node, 1)); in sxe_get_prop_hash()
1165 …if (node->type == XML_ELEMENT_NODE && (! match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefi… in sxe_get_prop_hash()
1169 name = (char *) node->name; in sxe_get_prop_hash()
1173 namelen = xmlStrlen(node->name); in sxe_get_prop_hash()
1176 _get_base_node_value(sxe, node, &value, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_get_prop_hash()
1184 if (UNEXPECTED(node->type == XML_ENTITY_DECL)) { in sxe_get_prop_hash()
1191 node = php_sxe_iterator_fetch(sxe, node->next, 0); in sxe_get_prop_hash()
1193 node = node->next; in sxe_get_prop_hash()
1242 if (sxe1->node != NULL && sxe2->node != NULL) { in sxe_objects_compare()
1244 if (sxe1->node == sxe2->node) { in sxe_objects_compare()
1250 if (sxe1->node == NULL && sxe2->node == NULL) { in sxe_objects_compare()
1296 sxe->xpath->node = nodeptr; in PHP_METHOD()
1384 xmlNodePtr node; in PHP_METHOD() local
1396 GET_NODE(sxe, node); in PHP_METHOD()
1397 node = php_sxe_get_first_node(sxe, node); in PHP_METHOD()
1399 if (!node) { in PHP_METHOD()
1404 if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { in PHP_METHOD()
1419 xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, NULL); in PHP_METHOD()
1425 if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { in PHP_METHOD()
1443 …xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, (const char *) ((xmlDocPtr) … in PHP_METHOD()
1478 static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, bool recursive, zval *return_v… in sxe_add_namespaces() argument
1482 if (node->ns) { in sxe_add_namespaces()
1483 sxe_add_namespace_name(return_value, node->ns); in sxe_add_namespaces()
1486 attr = node->properties; in sxe_add_namespaces()
1495 node = node->children; in sxe_add_namespaces()
1496 while (node) { in sxe_add_namespaces()
1497 if (node->type == XML_ELEMENT_NODE) { in sxe_add_namespaces()
1498 sxe_add_namespaces(sxe, node, recursive, return_value); in sxe_add_namespaces()
1500 node = node->next; in sxe_add_namespaces()
1539 xmlNodePtr node; in PHP_METHOD() local
1548 GET_NODE(sxe, node); in PHP_METHOD()
1549 node = php_sxe_get_first_node(sxe, node); in PHP_METHOD()
1551 if (node) { in PHP_METHOD()
1552 if (node->type == XML_ELEMENT_NODE) { in PHP_METHOD()
1553 sxe_add_namespaces(sxe, node, recursive, return_value); in PHP_METHOD()
1554 } else if (node->type == XML_ATTRIBUTE_NODE && node->ns) { in PHP_METHOD()
1555 sxe_add_namespace_name(return_value, node->ns); in PHP_METHOD()
1561 static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, bool recursive, zva… in sxe_add_registered_namespaces() argument
1565 if (node->type == XML_ELEMENT_NODE) { in sxe_add_registered_namespaces()
1566 ns = node->nsDef; in sxe_add_registered_namespaces()
1572 node = node->children; in sxe_add_registered_namespaces()
1573 while (node) { in sxe_add_registered_namespaces()
1574 sxe_add_registered_namespaces(sxe, node, recursive, return_value); in sxe_add_registered_namespaces()
1575 node = node->next; in sxe_add_registered_namespaces()
1587 xmlNodePtr node; in PHP_METHOD() local
1600 node = xmlDocGetRootElement((xmlDocPtr)sxe->document->ptr); in PHP_METHOD()
1602 GET_NODE(sxe, node); in PHP_METHOD()
1605 if (node == NULL) { in PHP_METHOD()
1610 sxe_add_registered_namespaces(sxe, node, recursive, return_value); in PHP_METHOD()
1620 xmlNodePtr node; in PHP_METHOD() local
1633 GET_NODE(sxe, node); in PHP_METHOD()
1634 node = php_sxe_get_first_node(sxe, node); in PHP_METHOD()
1635 if (!node) { in PHP_METHOD()
1639 _node_as_zval(sxe, node, return_value, SXE_ITER_CHILD, NULL, (xmlChar *)nsprefix, isprefix); in PHP_METHOD()
1648 xmlNodePtr node; in PHP_METHOD() local
1657 GET_NODE(sxe, node); in PHP_METHOD()
1658 node = php_sxe_get_first_node(sxe, node); in PHP_METHOD()
1659 if (node) { in PHP_METHOD()
1660 namelen = xmlStrlen(node->name); in PHP_METHOD()
1661 RETURN_STRINGL((char*)node->name, namelen); in PHP_METHOD()
1674 xmlNodePtr node; in PHP_METHOD() local
1682 GET_NODE(sxe, node); in PHP_METHOD()
1683 node = php_sxe_get_first_node(sxe, node); in PHP_METHOD()
1684 if (!node) { in PHP_METHOD()
1692 _node_as_zval(sxe, node, return_value, SXE_ITER_ATTRLIST, NULL, (xmlChar *)nsprefix, isprefix); in PHP_METHOD()
1702 xmlNodePtr node, newnode; in PHP_METHOD() local
1717 GET_NODE(sxe, node); in PHP_METHOD()
1724 node = php_sxe_get_first_node(sxe, node); in PHP_METHOD()
1726 if (node == NULL) { in PHP_METHOD()
1736 newnode = xmlNewChild(node, NULL, localname, (xmlChar *)value); in PHP_METHOD()
1743 nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri); in PHP_METHOD()
1766 xmlNodePtr node; in PHP_METHOD() local
1782 GET_NODE(sxe, node); in PHP_METHOD()
1784 node = php_sxe_get_first_node(sxe, node); in PHP_METHOD()
1786 if (node && node->type != XML_ELEMENT_NODE) { in PHP_METHOD()
1787 node = node->parent; in PHP_METHOD()
1790 if (node == NULL) { in PHP_METHOD()
1807 attrp = xmlHasNsProp(node, localname, (xmlChar *)nsuri); in PHP_METHOD()
1818 nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri); in PHP_METHOD()
1820 nsptr = xmlNewNs(node, (xmlChar *)nsuri, prefix); in PHP_METHOD()
1824 attrp = xmlNewNsProp(node, nsptr, localname, (xmlChar *)value); in PHP_METHOD()
1871 xmlNodePtr node; in sxe_object_cast_ex() local
1877 node = php_sxe_get_first_node(sxe, NULL); in sxe_object_cast_ex()
1878 if (node) { in sxe_object_cast_ex()
1887 node = php_sxe_get_first_node(sxe, NULL); in sxe_object_cast_ex()
1888 if (node) { in sxe_object_cast_ex()
1889 contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, node->children, 1); in sxe_object_cast_ex()
1892 if (!sxe->node) { in sxe_object_cast_ex()
1898 if (sxe->node && sxe->node->node) { in sxe_object_cast_ex()
1899 if (sxe->node->node->children) { in sxe_object_cast_ex()
1900 contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, sxe->node->node->children, 1); in sxe_object_cast_ex()
1901 } else if (sxe->node->node->type == XML_COMMENT_NODE || sxe->node->node->type == XML_PI_NODE) { in sxe_object_cast_ex()
1902 contents = sxe->node->node->content; in sxe_object_cast_ex()
1947 xmlNodePtr node; in php_sxe_count_elements_helper() local
1955 node = php_sxe_reset_iterator(sxe, 0); in php_sxe_count_elements_helper()
1957 while (node) in php_sxe_count_elements_helper()
1960 node = php_sxe_iterator_fetch(sxe, node->next, 0); in php_sxe_count_elements_helper()
2066 if (intern == NULL || intern->node == NULL) { in PHP_METHOD()
2071 curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->node)->node; in PHP_METHOD()
2092 xmlNodePtr node; in PHP_METHOD() local
2103 GET_NODE(child, node); in PHP_METHOD()
2104 if (node) { in PHP_METHOD()
2105 node = node->children; in PHP_METHOD()
2107 while (node && node->type != XML_ELEMENT_NODE) { in PHP_METHOD()
2108 node = node->next; in PHP_METHOD()
2110 RETURN_BOOL(node ? 1 : 0); in PHP_METHOD()
2140 bool is_root_element = sxe->node && sxe->node->node && sxe->node->node->parent in sxe_object_clone()
2141 …&& (sxe->node->node->parent->type == XML_DOCUMENT_NODE || sxe->node->node->parent->type == XML_HTM… in sxe_object_clone()
2165 if (sxe->node) { in sxe_object_clone()
2169 nodep = xmlDocCopyNode(sxe->node->node, docp, 1); in sxe_object_clone()
2413 static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data) /* {{{… in php_sxe_iterator_fetch() argument
2420 while (node) { in php_sxe_iterator_fetch()
2421 if (node->type == XML_ATTRIBUTE_NODE) { in php_sxe_iterator_fetch()
2422 if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2426 node = node->next; in php_sxe_iterator_fetch()
2429 while (node) { in php_sxe_iterator_fetch()
2430 if (node->type == XML_ATTRIBUTE_NODE) { in php_sxe_iterator_fetch()
2431 if (match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2435 node = node->next; in php_sxe_iterator_fetch()
2439 while (node) { in php_sxe_iterator_fetch()
2440 if (node->type == XML_ELEMENT_NODE) { in php_sxe_iterator_fetch()
2441 if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2445 node = node->next; in php_sxe_iterator_fetch()
2448 while (node) { in php_sxe_iterator_fetch()
2449 if (node->type == XML_ELEMENT_NODE) { in php_sxe_iterator_fetch()
2450 if (match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2454 node = node->next; in php_sxe_iterator_fetch()
2458 if (node && use_data) { in php_sxe_iterator_fetch()
2459 _node_as_zval(sxe, node, &sxe->iter.data, SXE_ITER_NONE, NULL, prefix, isprefix); in php_sxe_iterator_fetch()
2462 return node; in php_sxe_iterator_fetch()
2468 xmlNodePtr node; in php_sxe_reset_iterator_no_clear_iter_data() local
2469 GET_NODE(sxe, node) in php_sxe_reset_iterator_no_clear_iter_data()
2471 if (node) { in php_sxe_reset_iterator_no_clear_iter_data()
2476 node = node->children; in php_sxe_reset_iterator_no_clear_iter_data()
2479 node = (xmlNodePtr) node->properties; in php_sxe_reset_iterator_no_clear_iter_data()
2484 return php_sxe_iterator_fetch(sxe, node, use_data); in php_sxe_reset_iterator_no_clear_iter_data()
2562 if (intern != NULL && intern->node != NULL) { in php_sxe_iterator_current_key()
2563 curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->node)->node; in php_sxe_iterator_current_key()
2576 xmlNodePtr node = NULL; in php_sxe_move_forward_iterator() local
2581 GET_NODE(intern, node) in php_sxe_move_forward_iterator()
2586 if (node) { in php_sxe_move_forward_iterator()
2587 php_sxe_iterator_fetch(sxe, node->next, 1); in php_sxe_move_forward_iterator()
2619 xmlNodePtr node; in simplexml_export_node() local
2622 GET_NODE(sxe, node); in simplexml_export_node()
2623 return php_sxe_get_first_node(sxe, node); in simplexml_export_node()
2631 zval *node; in PHP_FUNCTION() local
2637 if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|C!", &node, &ce) == FAILURE) { in PHP_FUNCTION()
2641 nodep = php_libxml_import_node(node); in PHP_FUNCTION()
2644 …ent_type_error(1, "must be of type SimpleXMLElement|DOMNode, %s given", zend_zval_type_name(node)); in PHP_FUNCTION()
2665 object = Z_LIBXML_NODE_P(node); in PHP_FUNCTION()