Lines Matching refs:nodep
40 xmlNode *nodep; in dom_node_node_name_read() local
45 nodep = dom_object_get_node(obj); in dom_node_node_name_read()
47 if (nodep == NULL) { in dom_node_node_name_read()
52 switch (nodep->type) { in dom_node_node_name_read()
55 ns = nodep->ns; in dom_node_node_name_read()
59 qname = xmlStrcat(qname, nodep->name); in dom_node_node_name_read()
62 str = (char *) nodep->name; in dom_node_node_name_read()
66 ns = nodep->ns; in dom_node_node_name_read()
70 qname = xmlStrcat(qname, nodep->name); in dom_node_node_name_read()
73 str = (char *) nodep->name; in dom_node_node_name_read()
82 str = (char *) nodep->name; in dom_node_node_name_read()
126 xmlNode *nodep = dom_object_get_node(obj); in dom_node_node_value_read() local
129 if (nodep == NULL) { in dom_node_node_value_read()
135 switch (nodep->type) { in dom_node_node_value_read()
142 str = (char *) xmlNodeGetContent(nodep); in dom_node_node_value_read()
145 str = (char *) xmlNodeGetContent(nodep->children); in dom_node_node_value_read()
165 xmlNode *nodep = dom_object_get_node(obj); in dom_node_node_value_write() local
168 if (nodep == NULL) { in dom_node_node_value_write()
179 switch (nodep->type) { in dom_node_node_value_write()
182 if (nodep->children) { in dom_node_node_value_write()
183 node_list_unlink(nodep->children); in dom_node_node_value_write()
184 php_libxml_node_free_list((xmlNodePtr) nodep->children); in dom_node_node_value_write()
185 nodep->children = NULL; in dom_node_node_value_write()
192 xmlNodeSetContentLen(nodep, (xmlChar *) ZSTR_VAL(str), ZSTR_LEN(str) + 1); in dom_node_node_value_write()
211 xmlNode *nodep; in dom_node_node_type_read() local
213 nodep = dom_object_get_node(obj); in dom_node_node_type_read()
215 if (nodep == NULL) { in dom_node_node_type_read()
221 if (nodep->type == XML_DTD_NODE) { in dom_node_node_type_read()
224 ZVAL_LONG(retval, nodep->type); in dom_node_node_type_read()
239 xmlNode *nodep, *nodeparent; in dom_node_parent_node_read() local
241 nodep = dom_object_get_node(obj); in dom_node_parent_node_read()
243 if (nodep == NULL) { in dom_node_parent_node_read()
248 nodeparent = nodep->parent; in dom_node_parent_node_read()
267 xmlNode *nodep = dom_object_get_node(obj); in dom_node_child_nodes_read() local
270 if (nodep == NULL) { in dom_node_child_nodes_read()
290 xmlNode *nodep, *first = NULL; in dom_node_first_child_read() local
292 nodep = dom_object_get_node(obj); in dom_node_first_child_read()
294 if (nodep == NULL) { in dom_node_first_child_read()
299 if (dom_node_children_valid(nodep) == SUCCESS) { in dom_node_first_child_read()
300 first = nodep->children; in dom_node_first_child_read()
321 xmlNode *nodep, *last = NULL; in dom_node_last_child_read() local
323 nodep = dom_object_get_node(obj); in dom_node_last_child_read()
325 if (nodep == NULL) { in dom_node_last_child_read()
330 if (dom_node_children_valid(nodep) == SUCCESS) { in dom_node_last_child_read()
331 last = nodep->last; in dom_node_last_child_read()
352 xmlNode *nodep, *prevsib; in dom_node_previous_sibling_read() local
354 nodep = dom_object_get_node(obj); in dom_node_previous_sibling_read()
356 if (nodep == NULL) { in dom_node_previous_sibling_read()
361 prevsib = nodep->prev; in dom_node_previous_sibling_read()
380 xmlNode *nodep, *nextsib; in dom_node_next_sibling_read() local
382 nodep = dom_object_get_node(obj); in dom_node_next_sibling_read()
384 if (nodep == NULL) { in dom_node_next_sibling_read()
389 nextsib = nodep->next; in dom_node_next_sibling_read()
408 xmlNode *nodep, *prevsib; in dom_node_previous_element_sibling_read() local
410 nodep = dom_object_get_node(obj); in dom_node_previous_element_sibling_read()
412 if (nodep == NULL) { in dom_node_previous_element_sibling_read()
417 prevsib = nodep->prev; in dom_node_previous_element_sibling_read()
441 xmlNode *nodep, *nextsib; in dom_node_next_element_sibling_read() local
443 nodep = dom_object_get_node(obj); in dom_node_next_element_sibling_read()
445 if (nodep == NULL) { in dom_node_next_element_sibling_read()
450 nextsib = nodep->next; in dom_node_next_element_sibling_read()
474 xmlNode *nodep = dom_object_get_node(obj); in dom_node_attributes_read() local
477 if (nodep == NULL) { in dom_node_attributes_read()
482 if (nodep->type == XML_ELEMENT_NODE) { in dom_node_attributes_read()
502 xmlNode *nodep = dom_object_get_node(obj); in dom_node_owner_document_read() local
505 if (nodep == NULL) { in dom_node_owner_document_read()
510 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in dom_node_owner_document_read()
515 docp = nodep->doc; in dom_node_owner_document_read()
533 xmlNode *nodep = dom_object_get_node(obj); in dom_node_namespace_uri_read() local
536 if (nodep == NULL) { in dom_node_namespace_uri_read()
541 switch (nodep->type) { in dom_node_namespace_uri_read()
545 if (nodep->ns != NULL) { in dom_node_namespace_uri_read()
546 str = (char *) nodep->ns->href; in dom_node_namespace_uri_read()
572 xmlNode *nodep = dom_object_get_node(obj); in dom_node_prefix_read() local
576 if (nodep == NULL) { in dom_node_prefix_read()
581 switch (nodep->type) { in dom_node_prefix_read()
585 ns = nodep->ns; in dom_node_prefix_read()
607 xmlNode *nodep, *nsnode = NULL; in dom_node_prefix_write() local
612 nodep = dom_object_get_node(obj); in dom_node_prefix_write()
614 if (nodep == NULL) { in dom_node_prefix_write()
619 switch (nodep->type) { in dom_node_prefix_write()
621 nsnode = nodep; in dom_node_prefix_write()
625 nsnode = nodep->parent; in dom_node_prefix_write()
627 nsnode = xmlDocGetRootElement(nodep->doc); in dom_node_prefix_write()
636 if (nsnode && nodep->ns != NULL && !xmlStrEqual(nodep->ns->prefix, (xmlChar *)prefix)) { in dom_node_prefix_write()
637 strURI = (char *) nodep->ns->href; in dom_node_prefix_write()
640 (nodep->type == XML_ATTRIBUTE_NODE && zend_string_equals_literal(prefix_str, "xmlns") && in dom_node_prefix_write()
642 (nodep->type == XML_ATTRIBUTE_NODE && !strcmp((char *) nodep->name, "xmlns"))) { in dom_node_prefix_write()
647 … if (xmlStrEqual((xmlChar *)prefix, curns->prefix) && xmlStrEqual(nodep->ns->href, curns->href)) { in dom_node_prefix_write()
654 ns = xmlNewNs(nsnode, nodep->ns->href, (xmlChar *)prefix); in dom_node_prefix_write()
664 xmlSetNs(nodep, ns); in dom_node_prefix_write()
684 xmlNode *nodep = dom_object_get_node(obj); in dom_node_local_name_read() local
686 if (nodep == NULL) { in dom_node_local_name_read()
691 …if (nodep->type == XML_ELEMENT_NODE || nodep->type == XML_ATTRIBUTE_NODE || nodep->type == XML_NAM… in dom_node_local_name_read()
692 ZVAL_STRING(retval, (char *) (nodep->name)); in dom_node_local_name_read()
709 xmlNode *nodep = dom_object_get_node(obj); in dom_node_base_uri_read() local
712 if (nodep == NULL) { in dom_node_base_uri_read()
717 baseuri = xmlNodeGetBase(nodep->doc, nodep); in dom_node_base_uri_read()
737 xmlNode *nodep = dom_object_get_node(obj); in dom_node_text_content_read() local
740 if (nodep == NULL) { in dom_node_text_content_read()
745 str = (char *) xmlNodeGetContent(nodep); in dom_node_text_content_read()
759 xmlNode *nodep = dom_object_get_node(obj); in dom_node_text_content_write() local
762 if (nodep == NULL) { in dom_node_text_content_write()
773 int type = nodep->type; in dom_node_text_content_write()
782 if (nodep->children) { in dom_node_text_content_write()
783 node_list_unlink(nodep->children); in dom_node_text_content_write()
784 php_libxml_node_free_list((xmlNodePtr) nodep->children); in dom_node_text_content_write()
785 nodep->children = NULL; in dom_node_text_content_write()
789 xmlAddChild(nodep, textNode); in dom_node_text_content_write()
791 xmlNodeSetContent(nodep, xmlChars); in dom_node_text_content_write()
801 static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib… in _php_dom_insert_fragment() argument
809 nodep->children = newchild; in _php_dom_insert_fragment()
815 nodep->last = fragment->last; in _php_dom_insert_fragment()
823 node->parent = nodep; in _php_dom_insert_fragment()
824 if (node->doc != nodep->doc) { in _php_dom_insert_fragment()
825 xmlSetTreeDoc(node, nodep->doc); in _php_dom_insert_fragment()
1056 xmlNodePtr newchild, oldchild, nodep; in PHP_METHOD() local
1068 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1070 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_METHOD()
1077 if (!nodep->children) { in PHP_METHOD()
1083 if (dom_node_is_read_only(nodep) == SUCCESS || in PHP_METHOD()
1089 if (newchild->doc != nodep->doc && newchild->doc != NULL) { in PHP_METHOD()
1094 if (dom_hierarchy(nodep, newchild) == FAILURE) { in PHP_METHOD()
1106 if (oldchild->parent != nodep) { in PHP_METHOD()
1119 newchild = _php_dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern, newchildobj); in PHP_METHOD()
1121 dom_reconcile_ns_list(nodep->doc, newchild, last); in PHP_METHOD()
1124 xmlDtdPtr intSubset = xmlGetIntSubset(nodep->doc); in PHP_METHOD()
1127 if (newchild->doc == NULL && nodep->doc != NULL) { in PHP_METHOD()
1128 xmlSetTreeDoc(newchild, nodep->doc); in PHP_METHOD()
1133 dom_reconcile_ns(nodep->doc, newchild); in PHP_METHOD()
1136 nodep->doc->intSubset = (xmlDtd *) newchild; in PHP_METHOD()
1149 xmlNodePtr child, nodep; in PHP_METHOD() local
1158 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1160 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_METHOD()
1168 if (dom_node_is_read_only(nodep) == SUCCESS || in PHP_METHOD()
1174 if (!nodep->children || child->parent != nodep) { in PHP_METHOD()
1190 xmlNodePtr child, nodep, new_child = NULL; in PHP_METHOD() local
1199 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1201 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_METHOD()
1209 if (!dom_node_check_legacy_insertion_validity(nodep, child, stricterror)) { in PHP_METHOD()
1213 if (child->doc == NULL && nodep->doc != NULL) { in PHP_METHOD()
1222 if (child->type == XML_TEXT_NODE && nodep->last != NULL && nodep->last->type == XML_TEXT_NODE) { in PHP_METHOD()
1223 child->parent = nodep; in PHP_METHOD()
1225 xmlSetTreeDoc(child, nodep->doc); in PHP_METHOD()
1228 if (nodep->children == NULL) { in PHP_METHOD()
1229 nodep->children = child; in PHP_METHOD()
1230 nodep->last = child; in PHP_METHOD()
1232 child = nodep->last; in PHP_METHOD()
1235 nodep->last = new_child; in PHP_METHOD()
1241 lastattr = xmlHasProp(nodep, child->name); in PHP_METHOD()
1243 lastattr = xmlHasNsProp(nodep, child->name, child->ns->href); in PHP_METHOD()
1250 new_child = xmlAddChild(nodep, child); in PHP_METHOD()
1256 new_child = _php_dom_insert_fragment(nodep, nodep->last, NULL, child, intern, childobj); in PHP_METHOD()
1257 dom_reconcile_ns_list(nodep->doc, new_child, last); in PHP_METHOD()
1259 new_child = xmlAddChild(nodep, child); in PHP_METHOD()
1263 dom_reconcile_ns(nodep->doc, new_child); in PHP_METHOD()
1281 xmlNode *nodep; in PHP_METHOD() local
1289 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1291 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_METHOD()
1295 if (nodep->children) { in PHP_METHOD()
1370 xmlNode *nodep; in PHP_METHOD() local
1378 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1380 dom_normalize(nodep); in PHP_METHOD()
1406 xmlNode *nodep; in PHP_METHOD() local
1414 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1416 if (nodep->type != XML_ELEMENT_NODE) in PHP_METHOD()
1419 if (nodep->properties) { in PHP_METHOD()
1433 xmlNodePtr nodeotherp, nodep; in PHP_METHOD() local
1441 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1445 if (nodep == nodeotherp) { in PHP_METHOD()
1459 xmlNodePtr nodep, lookupp = NULL; in PHP_METHOD() local
1470 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1473 switch (nodep->type) { in PHP_METHOD()
1475 lookupp = nodep; in PHP_METHOD()
1479 lookupp = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_METHOD()
1489 lookupp = nodep->parent; in PHP_METHOD()
1510 xmlNodePtr nodep; in PHP_METHOD() local
1521 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1522 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in PHP_METHOD()
1523 nodep = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_METHOD()
1526 if (nodep && uri_len > 0) { in PHP_METHOD()
1527 nsptr = xmlSearchNs(nodep->doc, nodep, NULL); in PHP_METHOD()
1543 xmlNodePtr nodep; in PHP_METHOD() local
1554 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1555 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in PHP_METHOD()
1556 nodep = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_METHOD()
1557 if (nodep == NULL) { in PHP_METHOD()
1562 nsptr = xmlSearchNs(nodep->doc, nodep, (xmlChar *) prefix); in PHP_METHOD()
1575 xmlNodePtr nodep; in dom_canonicalization() local
1603 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in dom_canonicalization()
1605 docp = nodep->doc; in dom_canonicalization()
1613 if (nodep->type != XML_DOCUMENT_NODE) { in dom_canonicalization()
1615 ctxp->node = nodep; in dom_canonicalization()
1649 ctxp->node = nodep; in dom_canonicalization()
1771 xmlNode *nodep; in PHP_METHOD() local
1779 DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1781 value = (char *) xmlGetNodePath(nodep); in PHP_METHOD()
1796 xmlNode *nodep; in PHP_METHOD() local
1803 DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1805 RETURN_LONG(xmlGetLineNo(nodep)); in PHP_METHOD()