Lines Matching refs:node

122 function dump_html_tree($node, $show_attr = true, $deep = 0) {  argument
123 $node->dump($node);
171 foreach ($this->nodes as $node) {
172 $node->dump($show_attr, $depth + 1);
210 if (isset($node->_[HDOM_INFO_INNER])) {
211 $string .= "'" . $node->_[HDOM_INFO_INNER] . "'";
608 foreach ($nodes as $node) {
612 if (!$node->parent) {
617 if ($pass && $tag === 'text' && $node->tag === 'text') {
618 $ret[array_search($node, $this->dom->nodes, true)] = 1;
619 unset($node);
624 if ($pass && !in_array($node, $node->parent->children, true)) {
629 if ($pass && $tag !== '' && $tag !== $node->tag && $tag !== '*') {
634 if ($pass && $id !== '' && !isset($node->attr['id'])) {
639 if ($pass && $id !== '' && isset($node->attr['id'])) {
641 $node_id = explode(' ', trim($node->attr['id']))[0];
650 if (isset($node->attr['class'])) {
651 $node_classes = explode(' ', $node->attr['class']);
697 foreach ($node->parent->children as $c) {
698 if ($c->tag === $node->tag)
700 if ($c === $node)
712 if (isset($node->attr[$att_name])) {
719 && !isset($node->attr[$att_name])) {
733 $nodeKeyValue = $node->text();
735 $nodeKeyValue = $node->attr[$att_name];
741 . $node->tag
785 $ret[$node->_[HDOM_INFO_BEGIN]] = 1;
786 unset($node);
1323 function removeChild($node) { argument
1324 $nidx = array_search($node, $this->nodes, true);
1325 $cidx = array_search($node, $this->children, true);
1326 $didx = array_search($node, $this->dom->nodes, true);
1330 foreach ($node->children as $child) {
1331 $node->removeChild($child);
1334 foreach ($node->nodes as $entity) {
1335 $enidx = array_search($entity, $node->nodes, true);
1336 $edidx = array_search($entity, $node->dom->nodes, true);
1339 unset($node->nodes[$enidx]);
1340 unset($node->dom->nodes[$edidx]);
1348 $node->clear();
1401 function appendChild($node) { argument
1402 $node->parent($this);
1403 return $node;
1673 $node = new simple_html_dom_node($this);
1675 $node->_[HDOM_INFO_TEXT] = $s;
1676 $this->link_nodes($node, false);
1917 $node = new simple_html_dom_node($this);
1918 $node->_[HDOM_INFO_BEGIN] = $this->cursor;
1921 $node->tag_start = $begin_tag_pos;
1928 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until_char('>');
1931 $node->nodetype = HDOM_TYPE_COMMENT;
1932 $node->tag = 'comment';
1934 $node->nodetype = HDOM_TYPE_UNKNOWN;
1935 $node->tag = 'unknown';
1939 $node->_[HDOM_INFO_TEXT] .= '>';
1942 $this->link_nodes($node, true);
1951 $node->_[HDOM_INFO_TEXT] = $tag;
1952 $this->link_nodes($node, false);
1959 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>');
1963 $this->link_nodes($node, false);
1969 $node->_[HDOM_INFO_TEXT] .= '>';
1971 $this->link_nodes($node, false);
1977 $node->nodetype = HDOM_TYPE_ELEMENT;
1979 $node->tag = ($this->lowercase) ? $tag_lower : $tag;
1988 $node->parent = $this->parent;
2015 $node->nodetype = HDOM_TYPE_TEXT;
2016 $node->_[HDOM_INFO_END] = 0;
2017 $node->_[HDOM_INFO_TEXT] = '<' . $tag . $space[0] . $name;
2018 $node->tag = 'text';
2019 $this->link_nodes($node, false);
2026 $node->nodetype = HDOM_TYPE_TEXT;
2027 $node->tag = 'text';
2028 $node->attr = array();
2029 $node->_[HDOM_INFO_END] = 0;
2030 $node->_[HDOM_INFO_TEXT] = substr(
2037 $this->link_nodes($node, false);
2053 $this->parse_attr($node, $name, $space); // get attribute value
2056 $node->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_NO;
2057 $node->attr[$name] = true;
2063 $node->_[HDOM_INFO_SPACE][] = $space;
2076 $this->link_nodes($node, true);
2077 $node->_[HDOM_INFO_ENDSPACE] = $space[0];
2081 $node->_[HDOM_INFO_ENDSPACE] .= '/';
2082 $node->_[HDOM_INFO_END] = 0;
2085 if (!isset($this->self_closing_tags[strtolower($node->tag)])) {
2086 $this->parent = $node;
2095 if ($node->tag === 'br') {
2096 $node->_[HDOM_INFO_INNER] = $this->default_br_text;
2102 protected function parse_attr($node, $name, &$space) { argument
2103 $is_duplicate = isset($node->attr[$name]);
2140 $node->_[HDOM_INFO_QUOTE][] = $quote_type;
2141 $node->attr[$name] = $value;
2145 protected function link_nodes(&$node, $is_child) { argument
2146 $node->parent = $this->parent;
2147 $this->parent->nodes[] = $node;
2149 $this->parent->children[] = $node;
2154 $node = new simple_html_dom_node($this);
2156 $node->_[HDOM_INFO_TEXT] = '</' . $tag . '>';
2157 $this->link_nodes($node, false);