Lines Matching refs:node
56 static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data);
67 static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, cha… in _node_as_zval() argument
83 php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL); in _node_as_zval()
90 if ((__s)->node && (__s)->node->node) { \
91 __n = (__s)->node->node; \
98 static xmlNodePtr php_sxe_get_first_node(php_sxe_object *sxe, xmlNodePtr node) /* {{{ */ in php_sxe_get_first_node() argument
111 return node; in php_sxe_get_first_node()
116 static inline int match_ns(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name, int prefix) /* {{{ … in match_ns() argument
118 if (name == NULL && (node->ns == NULL || node->ns->prefix == NULL)) { in match_ns()
122 if (node->ns && !xmlStrcmp(prefix ? node->ns->prefix : node->ns->href, name)) { in match_ns()
130 static xmlNodePtr sxe_get_element_by_offset(php_sxe_object *sxe, zend_long offset, xmlNodePtr node,… in sxe_get_element_by_offset() argument
139 return node; in sxe_get_element_by_offset()
144 while (node && nodendx <= offset) { in sxe_get_element_by_offset()
145 SKIP_TEXT(node) in sxe_get_element_by_offset()
146 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_get_element_by_offset()
148 sxe->iter.type == SXE_ITER_ELEMENT && !xmlStrcmp(node->name, sxe->iter.name))) { in sxe_get_element_by_offset()
156 node = node->next; in sxe_get_element_by_offset()
163 return node; in sxe_get_element_by_offset()
167 static xmlNodePtr sxe_find_element_by_name(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name) /* … in sxe_find_element_by_name() argument
169 while (node) { in sxe_find_element_by_name()
170 SKIP_TEXT(node) in sxe_find_element_by_name()
171 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_find_element_by_name()
172 if (!xmlStrcmp(node->name, name)) { in sxe_find_element_by_name()
173 return node; in sxe_find_element_by_name()
177 node = node->next; in sxe_find_element_by_name()
182 static xmlNodePtr sxe_get_element_by_name(php_sxe_object *sxe, xmlNodePtr node, char **name, SXE_IT… in sxe_get_element_by_name() argument
185 xmlNodePtr orgnode = node; in sxe_get_element_by_name()
194 node = php_sxe_get_first_node(sxe, node); in sxe_get_element_by_name()
199 orgnode = sxe_find_element_by_name(sxe, node, sxe->iter.name); in sxe_get_element_by_name()
203 node = orgnode->children; in sxe_get_element_by_name()
206 while (node) { in sxe_get_element_by_name()
207 SKIP_TEXT(node) in sxe_get_element_by_name()
208 …if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix))… in sxe_get_element_by_name()
209 if (!xmlStrcmp(node->name, (xmlChar *)*name)) { in sxe_get_element_by_name()
215 retnode = node; in sxe_get_element_by_name()
219 node = node->next; in sxe_get_element_by_name()
239 xmlNodePtr node; in sxe_prop_dim_read() local
272 GET_NODE(sxe, node); in sxe_prop_dim_read()
277 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
278 attr = (xmlAttrPtr)node; in sxe_prop_dim_read()
281 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
282 attr = node ? node->properties : NULL; in sxe_prop_dim_read()
284 if (!member && node && node->parent && in sxe_prop_dim_read()
285 node->parent->type == XML_DOCUMENT_NODE) { in sxe_prop_dim_read()
294 if (node) { in sxe_prop_dim_read()
321 if (!sxe->node) { in sxe_prop_dim_read()
322 php_libxml_increment_node_ptr((php_libxml_node_object *)sxe, node, NULL); in sxe_prop_dim_read()
326 xmlNodePtr mynode = node; in sxe_prop_dim_read()
329 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_read()
336 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, &cnt); in sxe_prop_dim_read()
338 node = NULL; in sxe_prop_dim_read()
340 if (node) { in sxe_prop_dim_read()
341 _node_as_zval(sxe, node, rv, SXE_ITER_NONE, NULL, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
346 node = xmlNewTextChild(mynode->parent, mynode->ns, mynode->name, NULL); in sxe_prop_dim_read()
347 _node_as_zval(sxe, node, rv, SXE_ITER_NONE, NULL, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
353 GET_NODE(sxe, node); in sxe_prop_dim_read()
354 node = sxe_get_element_by_name(sxe, node, &name, &newtype); in sxe_prop_dim_read()
355 if (node) { in sxe_prop_dim_read()
356 _node_as_zval(sxe, node, rv, newtype, name, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
360 if (type != BP_VAR_IS || sxe_find_element_by_name(sxe, node->children, (xmlChar *) name)) { in sxe_prop_dim_read()
361 _node_as_zval(sxe, node, rv, SXE_ITER_ELEMENT, name, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_prop_dim_read()
398 static void change_node_zval(xmlNodePtr node, zval *value) in change_node_zval() argument
406 xmlNodeSetContentLen(node, (xmlChar *)"", 0); in change_node_zval()
423 buffer = xmlEncodeEntitiesReentrant(node->doc, (xmlChar *)Z_STRVAL_P(value)); in change_node_zval()
427 xmlNodeSetContentLen(node, buffer, buffer_len); in change_node_zval()
446 xmlNodePtr node; in sxe_prop_dim_write() local
499 GET_NODE(sxe, node); in sxe_prop_dim_write()
504 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_write()
505 attr = (xmlAttrPtr)node; in sxe_prop_dim_write()
508 mynode = node; in sxe_prop_dim_write()
509 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_write()
510 attr = node ? node->properties : NULL; in sxe_prop_dim_write()
512 if (!member && node && node->parent && in sxe_prop_dim_write()
513 node->parent->type == XML_DOCUMENT_NODE) { in sxe_prop_dim_write()
521 if (attribs && !node && sxe->iter.type == SXE_ITER_ELEMENT) { in sxe_prop_dim_write()
522 node = xmlNewChild(mynode, mynode->ns, sxe->iter.name, NULL); in sxe_prop_dim_write()
523 attr = node->properties; in sxe_prop_dim_write()
527 mynode = node; in sxe_prop_dim_write()
561 if (node) { in sxe_prop_dim_write()
590 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_prop_dim_write()
596 newnode = node; in sxe_prop_dim_write()
603 newnode = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, &cnt); in sxe_prop_dim_write()
609 node = node->children; in sxe_prop_dim_write()
610 while (node) { in sxe_prop_dim_write()
611 SKIP_TEXT(node); in sxe_prop_dim_write()
613 …if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefi… in sxe_prop_dim_write()
614 newnode = node; in sxe_prop_dim_write()
619 node = node->next; in sxe_prop_dim_write()
639 if (!node) { in sxe_prop_dim_write()
657 …newnode = (xmlNodePtr)xmlNewProp(node, (xmlChar *)Z_STRVAL_P(member), value ? (xmlChar *)Z_STRVAL_… in sxe_prop_dim_write()
694 xmlNodePtr node; in sxe_property_get_adr() local
701 GET_NODE(sxe, node); in sxe_property_get_adr()
704 node = sxe_get_element_by_name(sxe, node, &name, &type); in sxe_property_get_adr()
705 if (node) { in sxe_property_get_adr()
708 if (sxe_prop_dim_write(object, member, NULL, 1, 0, &node) != SUCCESS) { in sxe_property_get_adr()
714 _node_as_zval(sxe, node, &ret, type, name, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_property_get_adr()
732 xmlNodePtr node; in sxe_prop_dim_exists() local
745 GET_NODE(sxe, node); in sxe_prop_dim_exists()
752 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
760 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
761 attr = (xmlAttrPtr)node; in sxe_prop_dim_exists()
764 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
765 attr = node ? node->properties : NULL; in sxe_prop_dim_exists()
769 if (node) { in sxe_prop_dim_exists()
804 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
806 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, NULL); in sxe_prop_dim_exists()
808 node = sxe_find_element_by_name(sxe, node->children, (xmlChar *)Z_STRVAL_P(member)); in sxe_prop_dim_exists()
810 if (node) { in sxe_prop_dim_exists()
813 (!node->children || (node->children->type == XML_TEXT_NODE && !node->children->next && in sxe_prop_dim_exists()
814 …(!node->children->content || !node->children->content[0] || !xmlStrcmp(node->children->content, (c… in sxe_prop_dim_exists()
850 xmlNodePtr node; in sxe_prop_dim_delete() local
864 GET_NODE(sxe, node); in sxe_prop_dim_delete()
871 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
879 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
880 attr = (xmlAttrPtr)node; in sxe_prop_dim_delete()
883 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
884 attr = node ? node->properties : NULL; in sxe_prop_dim_delete()
888 if (node) { in sxe_prop_dim_delete()
920 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
922 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, NULL); in sxe_prop_dim_delete()
923 if (node) { in sxe_prop_dim_delete()
924 xmlUnlinkNode(node); in sxe_prop_dim_delete()
925 php_libxml_node_free_resource(node); in sxe_prop_dim_delete()
928 node = node->children; in sxe_prop_dim_delete()
929 while (node) { in sxe_prop_dim_delete()
930 nnext = node->next; in sxe_prop_dim_delete()
932 SKIP_TEXT(node); in sxe_prop_dim_delete()
934 …if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefi… in sxe_prop_dim_delete()
935 xmlUnlinkNode(node); in sxe_prop_dim_delete()
936 php_libxml_node_free_resource(node); in sxe_prop_dim_delete()
940 node = nnext; in sxe_prop_dim_delete()
986 static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval *value, xmlChar *ns… in _get_base_node_value() argument
991 if (node->children && node->children->type == XML_TEXT_NODE && !xmlIsBlankNode(node->children)) { in _get_base_node_value()
992 contents = xmlNodeListGetString(node->doc, node->children, 1); in _get_base_node_value()
1005 php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL); in _get_base_node_value()
1039 xmlNodePtr node; in sxe_prop_is_empty() local
1047 GET_NODE(sxe, node); in sxe_prop_is_empty()
1048 if (!node) { in sxe_prop_is_empty()
1053 node = php_sxe_get_first_node(sxe, node); in sxe_prop_is_empty()
1055 if (!node || node->type != XML_ENTITY_DECL) { in sxe_prop_is_empty()
1056 attr = node ? (xmlAttrPtr)node->properties : NULL; in sxe_prop_is_empty()
1066 GET_NODE(sxe, node); in sxe_prop_is_empty()
1067 node = php_sxe_get_first_node(sxe, node); in sxe_prop_is_empty()
1070 if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { in sxe_prop_is_empty()
1071 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_prop_is_empty()
1074 …SXE_ITER_NONE || !node->children || !node->parent || node->children->next || node->children->child… in sxe_prop_is_empty()
1075 node = node->children; in sxe_prop_is_empty()
1079 node = php_sxe_reset_iterator(sxe, 0); in sxe_prop_is_empty()
1083 while (node) { in sxe_prop_is_empty()
1084 if (node->children != NULL || node->prev != NULL || node->next != NULL) { in sxe_prop_is_empty()
1085 SKIP_TEXT(node); in sxe_prop_is_empty()
1087 if (node->type == XML_TEXT_NODE) { in sxe_prop_is_empty()
1088 const xmlChar *cur = node->content; in sxe_prop_is_empty()
1097 …if (node->type == XML_ELEMENT_NODE && (! match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefi… in sxe_prop_is_empty()
1101 if (!node->name) { in sxe_prop_is_empty()
1109 node = php_sxe_iterator_fetch(sxe, node->next, 0); in sxe_prop_is_empty()
1111 node = node->next; in sxe_prop_is_empty()
1134 xmlNodePtr node; in sxe_get_prop_hash() local
1157 GET_NODE(sxe, node); in sxe_get_prop_hash()
1158 if (!node) { in sxe_get_prop_hash()
1163 node = php_sxe_get_first_node(sxe, node); in sxe_get_prop_hash()
1165 if (!node || node->type != XML_ENTITY_DECL) { in sxe_get_prop_hash()
1166 attr = node ? (xmlAttrPtr)node->properties : NULL; in sxe_get_prop_hash()
1184 GET_NODE(sxe, node); in sxe_get_prop_hash()
1185 node = php_sxe_get_first_node(sxe, node); in sxe_get_prop_hash()
1187 if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { in sxe_get_prop_hash()
1188 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_get_prop_hash()
1189 ZVAL_STR(&value, sxe_xmlNodeListGetString(node->doc, node->children, 1)); in sxe_get_prop_hash()
1191 node = NULL; in sxe_get_prop_hash()
1194 …_NONE || !node->children || !node->parent || !node->next || node->children->next || node->children… in sxe_get_prop_hash()
1195 node = node->children; in sxe_get_prop_hash()
1200 node = php_sxe_reset_iterator(sxe, 0); in sxe_get_prop_hash()
1206 while (node) { in sxe_get_prop_hash()
1207 if (node->children != NULL || node->prev != NULL || node->next != NULL) { in sxe_get_prop_hash()
1208 SKIP_TEXT(node); in sxe_get_prop_hash()
1210 if (node->type == XML_TEXT_NODE) { in sxe_get_prop_hash()
1211 const xmlChar *cur = node->content; in sxe_get_prop_hash()
1214 ZVAL_STR(&value, sxe_xmlNodeListGetString(node->doc, node, 1)); in sxe_get_prop_hash()
1221 …if (node->type == XML_ELEMENT_NODE && (! match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefi… in sxe_get_prop_hash()
1225 name = (char *) node->name; in sxe_get_prop_hash()
1229 namelen = xmlStrlen(node->name); in sxe_get_prop_hash()
1232 _get_base_node_value(sxe, node, &value, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_get_prop_hash()
1241 node = php_sxe_iterator_fetch(sxe, node->next, 0); in sxe_get_prop_hash()
1243 node = node->next; in sxe_get_prop_hash()
1290 if (sxe1->node == NULL) { in sxe_objects_compare()
1291 if (sxe2->node) { in sxe_objects_compare()
1297 return !(sxe1->node == sxe2->node); in sxe_objects_compare()
1331 if (!sxe->node) { in SXE_METHOD()
1333 if (!sxe->node) { in SXE_METHOD()
1338 nodeptr = php_sxe_get_first_node(sxe, sxe->node->node); in SXE_METHOD()
1340 sxe->xpath->node = nodeptr; in SXE_METHOD()
1423 xmlNodePtr node; in SXE_METHOD() local
1440 GET_NODE(sxe, node); in SXE_METHOD()
1441 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1443 if (node) { in SXE_METHOD()
1444 if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { in SXE_METHOD()
1459 xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, NULL); in SXE_METHOD()
1469 GET_NODE(sxe, node); in SXE_METHOD()
1470 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1472 if (node) { in SXE_METHOD()
1473 if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { in SXE_METHOD()
1491 …xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, (const char *) ((xmlDocPtr) … in SXE_METHOD()
1529 static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *ret… in sxe_add_namespaces() argument
1533 if (node->ns) { in sxe_add_namespaces()
1534 sxe_add_namespace_name(return_value, node->ns); in sxe_add_namespaces()
1537 attr = node->properties; in sxe_add_namespaces()
1546 node = node->children; in sxe_add_namespaces()
1547 while (node) { in sxe_add_namespaces()
1548 if (node->type == XML_ELEMENT_NODE) { in sxe_add_namespaces()
1549 sxe_add_namespaces(sxe, node, recursive, return_value); in sxe_add_namespaces()
1551 node = node->next; in sxe_add_namespaces()
1562 xmlNodePtr node; in SXE_METHOD() local
1571 GET_NODE(sxe, node); in SXE_METHOD()
1572 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1574 if (node) { in SXE_METHOD()
1575 if (node->type == XML_ELEMENT_NODE) { in SXE_METHOD()
1576 sxe_add_namespaces(sxe, node, recursive, return_value); in SXE_METHOD()
1577 } else if (node->type == XML_ATTRIBUTE_NODE && node->ns) { in SXE_METHOD()
1578 sxe_add_namespace_name(return_value, node->ns); in SXE_METHOD()
1584 static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive… in sxe_add_registered_namespaces() argument
1588 if (node->type == XML_ELEMENT_NODE) { in sxe_add_registered_namespaces()
1589 ns = node->nsDef; in sxe_add_registered_namespaces()
1595 node = node->children; in sxe_add_registered_namespaces()
1596 while (node) { in sxe_add_registered_namespaces()
1597 sxe_add_registered_namespaces(sxe, node, recursive, return_value); in sxe_add_registered_namespaces()
1598 node = node->next; in sxe_add_registered_namespaces()
1611 xmlNodePtr node; in SXE_METHOD() local
1619 node = xmlDocGetRootElement((xmlDocPtr)sxe->document->ptr); in SXE_METHOD()
1621 GET_NODE(sxe, node); in SXE_METHOD()
1624 if (node == NULL) { in SXE_METHOD()
1629 sxe_add_registered_namespaces(sxe, node, recursive, return_value); in SXE_METHOD()
1640 xmlNodePtr node; in SXE_METHOD() local
1653 GET_NODE(sxe, node); in SXE_METHOD()
1654 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1656 _node_as_zval(sxe, node, return_value, SXE_ITER_CHILD, NULL, (xmlChar *)nsprefix, isprefix); in SXE_METHOD()
1666 xmlNodePtr node; in SXE_METHOD() local
1671 GET_NODE(sxe, node); in SXE_METHOD()
1672 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1673 if (node) { in SXE_METHOD()
1674 namelen = xmlStrlen(node->name); in SXE_METHOD()
1675 RETURN_STRINGL((char*)node->name, namelen); in SXE_METHOD()
1689 xmlNodePtr node; in SXE_METHOD() local
1697 GET_NODE(sxe, node); in SXE_METHOD()
1703 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1705 _node_as_zval(sxe, node, return_value, SXE_ITER_ATTRLIST, NULL, (xmlChar *)nsprefix, isprefix); in SXE_METHOD()
1716 xmlNodePtr node, newnode; in SXE_METHOD() local
1731 GET_NODE(sxe, node); in SXE_METHOD()
1738 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1740 if (node == NULL) { in SXE_METHOD()
1750 newnode = xmlNewChild(node, NULL, localname, (xmlChar *)value); in SXE_METHOD()
1757 nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri); in SXE_METHOD()
1781 xmlNodePtr node; in SXE_METHOD() local
1797 GET_NODE(sxe, node); in SXE_METHOD()
1799 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1801 if (node && node->type != XML_ELEMENT_NODE) { in SXE_METHOD()
1802 node = node->parent; in SXE_METHOD()
1805 if (node == NULL) { in SXE_METHOD()
1822 attrp = xmlHasNsProp(node, localname, (xmlChar *)nsuri); in SXE_METHOD()
1833 nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri); in SXE_METHOD()
1835 nsptr = xmlNewNs(node, (xmlChar *)nsuri, prefix); in SXE_METHOD()
1839 attrp = xmlNewNsProp(node, nsptr, localname, (xmlChar *)value); in SXE_METHOD()
1884 xmlNodePtr node; in sxe_object_cast_ex() local
1890 node = php_sxe_get_first_node(sxe, NULL); in sxe_object_cast_ex()
1891 if (node) { in sxe_object_cast_ex()
1900 node = php_sxe_get_first_node(sxe, NULL); in sxe_object_cast_ex()
1901 if (node) { in sxe_object_cast_ex()
1902 contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, node->children, 1); in sxe_object_cast_ex()
1905 if (!sxe->node) { in sxe_object_cast_ex()
1911 if (sxe->node && sxe->node->node) { in sxe_object_cast_ex()
1912 if (sxe->node->node->children) { in sxe_object_cast_ex()
1913 contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, sxe->node->node->children, 1); in sxe_object_cast_ex()
1958 xmlNodePtr node; in php_sxe_count_elements_helper() local
1966 node = php_sxe_reset_iterator(sxe, 0); in php_sxe_count_elements_helper()
1968 while (node) in php_sxe_count_elements_helper()
1971 node = php_sxe_iterator_fetch(sxe, node->next, 0); in php_sxe_count_elements_helper()
2086 if (sxe->node) { in sxe_object_clone()
2087 nodep = xmlDocCopyNode(sxe->node->node, docp, 1); in sxe_object_clone()
2361 static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data) /* {{{… in php_sxe_iterator_fetch() argument
2368 while (node) { in php_sxe_iterator_fetch()
2369 if (node->type == XML_ATTRIBUTE_NODE) { in php_sxe_iterator_fetch()
2370 if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2374 node = node->next; in php_sxe_iterator_fetch()
2377 while (node) { in php_sxe_iterator_fetch()
2378 if (node->type == XML_ATTRIBUTE_NODE) { in php_sxe_iterator_fetch()
2379 if (match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2383 node = node->next; in php_sxe_iterator_fetch()
2387 while (node) { in php_sxe_iterator_fetch()
2388 if (node->type == XML_ELEMENT_NODE) { in php_sxe_iterator_fetch()
2389 if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2393 node = node->next; in php_sxe_iterator_fetch()
2396 while (node) { in php_sxe_iterator_fetch()
2397 if (node->type == XML_ELEMENT_NODE) { in php_sxe_iterator_fetch()
2398 if (match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2402 node = node->next; in php_sxe_iterator_fetch()
2406 if (node && use_data) { in php_sxe_iterator_fetch()
2407 _node_as_zval(sxe, node, &sxe->iter.data, SXE_ITER_NONE, NULL, prefix, isprefix); in php_sxe_iterator_fetch()
2410 return node; in php_sxe_iterator_fetch()
2416 xmlNodePtr node; in php_sxe_reset_iterator() local
2423 GET_NODE(sxe, node) in php_sxe_reset_iterator()
2425 if (node) { in php_sxe_reset_iterator()
2430 node = node->children; in php_sxe_reset_iterator()
2433 node = (xmlNodePtr) node->properties; in php_sxe_reset_iterator()
2435 return php_sxe_iterator_fetch(sxe, node, use_data); in php_sxe_reset_iterator()
2493 if (intern != NULL && intern->node != NULL) { in php_sxe_iterator_current_key()
2494 curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->node)->node; in php_sxe_iterator_current_key()
2507 xmlNodePtr node = NULL; in php_sxe_move_forward_iterator() local
2512 GET_NODE(intern, node) in php_sxe_move_forward_iterator()
2517 if (node) { in php_sxe_move_forward_iterator()
2518 php_sxe_iterator_fetch(sxe, node->next, 1); in php_sxe_move_forward_iterator()
2544 xmlNodePtr node; in simplexml_export_node() local
2547 GET_NODE(sxe, node); in simplexml_export_node()
2548 return php_sxe_get_first_node(sxe, node); in simplexml_export_node()
2557 zval *node; in PHP_FUNCTION() local
2563 if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|C!", &node, &ce) == FAILURE) { in PHP_FUNCTION()
2567 object = Z_LIBXML_NODE_P(node); in PHP_FUNCTION()
2569 nodep = php_libxml_import_node(node); in PHP_FUNCTION()
2619 ZEND_ARG_INFO(0, node)