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()
599 newnode = node; in sxe_prop_dim_write()
606 newnode = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, &cnt); in sxe_prop_dim_write()
612 node = node->children; in sxe_prop_dim_write()
613 while (node) { in sxe_prop_dim_write()
614 SKIP_TEXT(node); in sxe_prop_dim_write()
616 …if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefi… in sxe_prop_dim_write()
617 newnode = node; in sxe_prop_dim_write()
622 node = node->next; in sxe_prop_dim_write()
642 if (!node) { in sxe_prop_dim_write()
660 …newnode = (xmlNodePtr)xmlNewProp(node, (xmlChar *)Z_STRVAL_P(member), value ? (xmlChar *)Z_STRVAL_… in sxe_prop_dim_write()
697 xmlNodePtr node; in sxe_property_get_adr() local
704 GET_NODE(sxe, node); in sxe_property_get_adr()
707 node = sxe_get_element_by_name(sxe, node, &name, &type); in sxe_property_get_adr()
708 if (node) { in sxe_property_get_adr()
711 if (sxe_prop_dim_write(object, member, NULL, 1, 0, &node) != SUCCESS) { in sxe_property_get_adr()
717 _node_as_zval(sxe, node, &ret, type, name, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_property_get_adr()
734 xmlNodePtr node; in sxe_prop_dim_exists() local
747 GET_NODE(sxe, node); in sxe_prop_dim_exists()
754 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
762 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
763 attr = (xmlAttrPtr)node; in sxe_prop_dim_exists()
766 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
767 attr = node ? node->properties : NULL; in sxe_prop_dim_exists()
771 if (node) { in sxe_prop_dim_exists()
806 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_exists()
808 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, NULL); in sxe_prop_dim_exists()
810 node = sxe_find_element_by_name(sxe, node->children, (xmlChar *)Z_STRVAL_P(member)); in sxe_prop_dim_exists()
812 if (node) { in sxe_prop_dim_exists()
815 (!node->children || (node->children->type == XML_TEXT_NODE && !node->children->next && in sxe_prop_dim_exists()
816 …(!node->children->content || !node->children->content[0] || !xmlStrcmp(node->children->content, (c… in sxe_prop_dim_exists()
852 xmlNodePtr node; in sxe_prop_dim_delete() local
866 GET_NODE(sxe, node); in sxe_prop_dim_delete()
873 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
881 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
882 attr = (xmlAttrPtr)node; in sxe_prop_dim_delete()
885 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
886 attr = node ? node->properties : NULL; in sxe_prop_dim_delete()
890 if (node) { in sxe_prop_dim_delete()
922 node = php_sxe_get_first_node(sxe, node); in sxe_prop_dim_delete()
924 node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node, NULL); in sxe_prop_dim_delete()
925 if (node) { in sxe_prop_dim_delete()
926 xmlUnlinkNode(node); in sxe_prop_dim_delete()
927 php_libxml_node_free_resource(node); in sxe_prop_dim_delete()
930 node = node->children; in sxe_prop_dim_delete()
931 while (node) { in sxe_prop_dim_delete()
932 nnext = node->next; in sxe_prop_dim_delete()
934 SKIP_TEXT(node); in sxe_prop_dim_delete()
936 …if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefi… in sxe_prop_dim_delete()
937 xmlUnlinkNode(node); in sxe_prop_dim_delete()
938 php_libxml_node_free_resource(node); in sxe_prop_dim_delete()
942 node = nnext; in sxe_prop_dim_delete()
988 static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval *value, xmlChar *ns… in _get_base_node_value() argument
993 if (node->children && node->children->type == XML_TEXT_NODE && !xmlIsBlankNode(node->children)) { in _get_base_node_value()
994 contents = xmlNodeListGetString(node->doc, node->children, 1); in _get_base_node_value()
1007 php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL); in _get_base_node_value()
1041 xmlNodePtr node; in sxe_prop_is_empty() local
1049 GET_NODE(sxe, node); in sxe_prop_is_empty()
1050 if (!node) { in sxe_prop_is_empty()
1055 node = php_sxe_get_first_node(sxe, node); in sxe_prop_is_empty()
1057 if (!node || node->type != XML_ENTITY_DECL) { in sxe_prop_is_empty()
1058 attr = node ? (xmlAttrPtr)node->properties : NULL; in sxe_prop_is_empty()
1068 GET_NODE(sxe, node); in sxe_prop_is_empty()
1069 node = php_sxe_get_first_node(sxe, node); in sxe_prop_is_empty()
1072 if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { in sxe_prop_is_empty()
1073 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_prop_is_empty()
1076 …SXE_ITER_NONE || !node->children || !node->parent || node->children->next || node->children->child… in sxe_prop_is_empty()
1077 node = node->children; in sxe_prop_is_empty()
1081 node = php_sxe_reset_iterator(sxe, 0); in sxe_prop_is_empty()
1085 while (node) { in sxe_prop_is_empty()
1086 if (node->children != NULL || node->prev != NULL || node->next != NULL) { in sxe_prop_is_empty()
1087 SKIP_TEXT(node); in sxe_prop_is_empty()
1089 if (node->type == XML_TEXT_NODE) { in sxe_prop_is_empty()
1090 const xmlChar *cur = node->content; in sxe_prop_is_empty()
1099 …if (node->type == XML_ELEMENT_NODE && (! match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefi… in sxe_prop_is_empty()
1103 if (!node->name) { in sxe_prop_is_empty()
1111 node = php_sxe_iterator_fetch(sxe, node->next, 0); in sxe_prop_is_empty()
1113 node = node->next; in sxe_prop_is_empty()
1136 xmlNodePtr node; in sxe_get_prop_hash() local
1159 GET_NODE(sxe, node); in sxe_get_prop_hash()
1160 if (!node) { in sxe_get_prop_hash()
1165 node = php_sxe_get_first_node(sxe, node); in sxe_get_prop_hash()
1167 if (!node || node->type != XML_ENTITY_DECL) { in sxe_get_prop_hash()
1168 attr = node ? (xmlAttrPtr)node->properties : NULL; in sxe_get_prop_hash()
1186 GET_NODE(sxe, node); in sxe_get_prop_hash()
1187 node = php_sxe_get_first_node(sxe, node); in sxe_get_prop_hash()
1189 if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { in sxe_get_prop_hash()
1190 if (node->type == XML_ATTRIBUTE_NODE) { in sxe_get_prop_hash()
1191 ZVAL_STR(&value, sxe_xmlNodeListGetString(node->doc, node->children, 1)); in sxe_get_prop_hash()
1193 node = NULL; in sxe_get_prop_hash()
1196 …_NONE || !node->children || !node->parent || !node->next || node->children->next || node->children… in sxe_get_prop_hash()
1197 node = node->children; in sxe_get_prop_hash()
1202 node = php_sxe_reset_iterator(sxe, 0); in sxe_get_prop_hash()
1208 while (node) { in sxe_get_prop_hash()
1209 if (node->children != NULL || node->prev != NULL || node->next != NULL) { in sxe_get_prop_hash()
1210 SKIP_TEXT(node); in sxe_get_prop_hash()
1212 if (node->type == XML_TEXT_NODE) { in sxe_get_prop_hash()
1213 const xmlChar *cur = node->content; in sxe_get_prop_hash()
1216 ZVAL_STR(&value, sxe_xmlNodeListGetString(node->doc, node, 1)); in sxe_get_prop_hash()
1223 …if (node->type == XML_ELEMENT_NODE && (! match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefi… in sxe_get_prop_hash()
1227 name = (char *) node->name; in sxe_get_prop_hash()
1231 namelen = xmlStrlen(node->name); in sxe_get_prop_hash()
1234 _get_base_node_value(sxe, node, &value, sxe->iter.nsprefix, sxe->iter.isprefix); in sxe_get_prop_hash()
1243 node = php_sxe_iterator_fetch(sxe, node->next, 0); in sxe_get_prop_hash()
1245 node = node->next; in sxe_get_prop_hash()
1292 if (sxe1->node == NULL) { in sxe_objects_compare()
1293 if (sxe2->node) { in sxe_objects_compare()
1299 return !(sxe1->node == sxe2->node); in sxe_objects_compare()
1333 if (!sxe->node) { in SXE_METHOD()
1335 if (!sxe->node) { in SXE_METHOD()
1340 nodeptr = php_sxe_get_first_node(sxe, sxe->node->node); in SXE_METHOD()
1342 sxe->xpath->node = nodeptr; in SXE_METHOD()
1425 xmlNodePtr node; in SXE_METHOD() local
1442 GET_NODE(sxe, node); in SXE_METHOD()
1443 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1445 if (node) { in SXE_METHOD()
1446 if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { in SXE_METHOD()
1461 xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, NULL); in SXE_METHOD()
1471 GET_NODE(sxe, node); in SXE_METHOD()
1472 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1474 if (node) { in SXE_METHOD()
1475 if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { in SXE_METHOD()
1493 …xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, (const char *) ((xmlDocPtr) … in SXE_METHOD()
1531 static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *ret… in sxe_add_namespaces() argument
1535 if (node->ns) { in sxe_add_namespaces()
1536 sxe_add_namespace_name(return_value, node->ns); in sxe_add_namespaces()
1539 attr = node->properties; in sxe_add_namespaces()
1548 node = node->children; in sxe_add_namespaces()
1549 while (node) { in sxe_add_namespaces()
1550 if (node->type == XML_ELEMENT_NODE) { in sxe_add_namespaces()
1551 sxe_add_namespaces(sxe, node, recursive, return_value); in sxe_add_namespaces()
1553 node = node->next; in sxe_add_namespaces()
1564 xmlNodePtr node; in SXE_METHOD() local
1573 GET_NODE(sxe, node); in SXE_METHOD()
1574 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1576 if (node) { in SXE_METHOD()
1577 if (node->type == XML_ELEMENT_NODE) { in SXE_METHOD()
1578 sxe_add_namespaces(sxe, node, recursive, return_value); in SXE_METHOD()
1579 } else if (node->type == XML_ATTRIBUTE_NODE && node->ns) { in SXE_METHOD()
1580 sxe_add_namespace_name(return_value, node->ns); in SXE_METHOD()
1586 static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive… in sxe_add_registered_namespaces() argument
1590 if (node->type == XML_ELEMENT_NODE) { in sxe_add_registered_namespaces()
1591 ns = node->nsDef; in sxe_add_registered_namespaces()
1597 node = node->children; in sxe_add_registered_namespaces()
1598 while (node) { in sxe_add_registered_namespaces()
1599 sxe_add_registered_namespaces(sxe, node, recursive, return_value); in sxe_add_registered_namespaces()
1600 node = node->next; in sxe_add_registered_namespaces()
1613 xmlNodePtr node; in SXE_METHOD() local
1621 node = xmlDocGetRootElement((xmlDocPtr)sxe->document->ptr); in SXE_METHOD()
1623 GET_NODE(sxe, node); in SXE_METHOD()
1626 if (node == NULL) { in SXE_METHOD()
1631 sxe_add_registered_namespaces(sxe, node, recursive, return_value); in SXE_METHOD()
1642 xmlNodePtr node; in SXE_METHOD() local
1655 GET_NODE(sxe, node); in SXE_METHOD()
1656 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1658 _node_as_zval(sxe, node, return_value, SXE_ITER_CHILD, NULL, (xmlChar *)nsprefix, isprefix); in SXE_METHOD()
1668 xmlNodePtr node; in SXE_METHOD() local
1673 GET_NODE(sxe, node); in SXE_METHOD()
1674 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1675 if (node) { in SXE_METHOD()
1676 namelen = xmlStrlen(node->name); in SXE_METHOD()
1677 RETURN_STRINGL((char*)node->name, namelen); in SXE_METHOD()
1691 xmlNodePtr node; in SXE_METHOD() local
1699 GET_NODE(sxe, node); in SXE_METHOD()
1705 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1707 _node_as_zval(sxe, node, return_value, SXE_ITER_ATTRLIST, NULL, (xmlChar *)nsprefix, isprefix); in SXE_METHOD()
1718 xmlNodePtr node, newnode; in SXE_METHOD() local
1733 GET_NODE(sxe, node); in SXE_METHOD()
1740 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1742 if (node == NULL) { in SXE_METHOD()
1752 newnode = xmlNewChild(node, NULL, localname, (xmlChar *)value); in SXE_METHOD()
1759 nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri); in SXE_METHOD()
1783 xmlNodePtr node; in SXE_METHOD() local
1799 GET_NODE(sxe, node); in SXE_METHOD()
1801 node = php_sxe_get_first_node(sxe, node); in SXE_METHOD()
1803 if (node && node->type != XML_ELEMENT_NODE) { in SXE_METHOD()
1804 node = node->parent; in SXE_METHOD()
1807 if (node == NULL) { in SXE_METHOD()
1824 attrp = xmlHasNsProp(node, localname, (xmlChar *)nsuri); in SXE_METHOD()
1835 nsptr = xmlSearchNsByHref(node->doc, node, (xmlChar *)nsuri); in SXE_METHOD()
1837 nsptr = xmlNewNs(node, (xmlChar *)nsuri, prefix); in SXE_METHOD()
1841 attrp = xmlNewNsProp(node, nsptr, localname, (xmlChar *)value); in SXE_METHOD()
1886 xmlNodePtr node; in sxe_object_cast_ex() local
1892 node = php_sxe_get_first_node(sxe, NULL); in sxe_object_cast_ex()
1893 if (node) { in sxe_object_cast_ex()
1902 node = php_sxe_get_first_node(sxe, NULL); in sxe_object_cast_ex()
1903 if (node) { in sxe_object_cast_ex()
1904 contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, node->children, 1); in sxe_object_cast_ex()
1907 if (!sxe->node) { in sxe_object_cast_ex()
1913 if (sxe->node && sxe->node->node) { in sxe_object_cast_ex()
1914 if (sxe->node->node->children) { in sxe_object_cast_ex()
1915 contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, sxe->node->node->children, 1); in sxe_object_cast_ex()
1960 xmlNodePtr node; in php_sxe_count_elements_helper() local
1968 node = php_sxe_reset_iterator(sxe, 0); in php_sxe_count_elements_helper()
1970 while (node) in php_sxe_count_elements_helper()
1973 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()
2362 static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data) /* {{{… in php_sxe_iterator_fetch() argument
2369 while (node) { in php_sxe_iterator_fetch()
2370 if (node->type == XML_ATTRIBUTE_NODE) { in php_sxe_iterator_fetch()
2371 if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2375 node = node->next; in php_sxe_iterator_fetch()
2378 while (node) { in php_sxe_iterator_fetch()
2379 if (node->type == XML_ATTRIBUTE_NODE) { in php_sxe_iterator_fetch()
2380 if (match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2384 node = node->next; in php_sxe_iterator_fetch()
2388 while (node) { in php_sxe_iterator_fetch()
2389 if (node->type == XML_ELEMENT_NODE) { in php_sxe_iterator_fetch()
2390 if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2394 node = node->next; in php_sxe_iterator_fetch()
2397 while (node) { in php_sxe_iterator_fetch()
2398 if (node->type == XML_ELEMENT_NODE) { in php_sxe_iterator_fetch()
2399 if (match_ns(sxe, node, prefix, isprefix)) { in php_sxe_iterator_fetch()
2403 node = node->next; in php_sxe_iterator_fetch()
2407 if (node && use_data) { in php_sxe_iterator_fetch()
2408 _node_as_zval(sxe, node, &sxe->iter.data, SXE_ITER_NONE, NULL, prefix, isprefix); in php_sxe_iterator_fetch()
2411 return node; in php_sxe_iterator_fetch()
2417 xmlNodePtr node; in php_sxe_reset_iterator() local
2424 GET_NODE(sxe, node) in php_sxe_reset_iterator()
2426 if (node) { in php_sxe_reset_iterator()
2431 node = node->children; in php_sxe_reset_iterator()
2434 node = (xmlNodePtr) node->properties; in php_sxe_reset_iterator()
2436 return php_sxe_iterator_fetch(sxe, node, use_data); in php_sxe_reset_iterator()
2494 if (intern != NULL && intern->node != NULL) { in php_sxe_iterator_current_key()
2495 curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->node)->node; in php_sxe_iterator_current_key()
2508 xmlNodePtr node = NULL; in php_sxe_move_forward_iterator() local
2513 GET_NODE(intern, node) in php_sxe_move_forward_iterator()
2518 if (node) { in php_sxe_move_forward_iterator()
2519 php_sxe_iterator_fetch(sxe, node->next, 1); in php_sxe_move_forward_iterator()
2545 xmlNodePtr node; in simplexml_export_node() local
2548 GET_NODE(sxe, node); in simplexml_export_node()
2549 return php_sxe_get_first_node(sxe, node); in simplexml_export_node()
2558 zval *node; in PHP_FUNCTION() local
2564 if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|C!", &node, &ce) == FAILURE) { in PHP_FUNCTION()
2568 object = Z_LIBXML_NODE_P(node); in PHP_FUNCTION()
2570 nodep = php_libxml_import_node(node); in PHP_FUNCTION()
2620 ZEND_ARG_INFO(0, node)