Home
last modified time | relevance | path

Searched refs:doc (Results 1 – 25 of 281) sorted by relevance

12345678910>>...12

/PHP-8.3/ext/dom/tests/
H A Dbug80602.phpt13 echo "1 ", $doc->saveXML($doc->documentElement).PHP_EOL;
19 echo "2 ", $doc->saveXML($doc->documentElement).PHP_EOL;
26 echo "3 ", $doc->saveXML($doc->documentElement).PHP_EOL;
32 echo "4 ", $doc->saveXML($doc->documentElement).PHP_EOL;
39 echo "5 ", $doc->saveXML($doc->documentElement).PHP_EOL;
45 echo "6 ", $doc->saveXML($doc->documentElement).PHP_EOL;
52 echo "7 ", $doc->saveXML($doc->documentElement).PHP_EOL;
58 echo "8 ", $doc->saveXML($doc->documentElement).PHP_EOL;
65 echo "9 ", $doc->saveXML($doc->documentElement).PHP_EOL;
71 echo "10 ", $doc->saveXML($doc->documentElement).PHP_EOL;
[all …]
H A Dbug80602_2.phpt13 echo "1 ", $doc->saveXML($doc->documentElement).PHP_EOL;
19 echo "2 ", $doc->saveXML($doc->documentElement).PHP_EOL;
26 echo "3 ", $doc->saveXML($doc->documentElement).PHP_EOL;
32 echo "4 ", $doc->saveXML($doc->documentElement).PHP_EOL;
39 echo "5 ", $doc->saveXML($doc->documentElement).PHP_EOL;
45 echo "6 ", $doc->saveXML($doc->documentElement).PHP_EOL;
52 echo "7 ", $doc->saveXML($doc->documentElement).PHP_EOL;
58 echo "8 ", $doc->saveXML($doc->documentElement).PHP_EOL;
65 echo "9 ", $doc->saveXML($doc->documentElement).PHP_EOL;
71 echo "10 ", $doc->saveXML($doc->documentElement).PHP_EOL;
[all …]
H A Dgh11791.phpt7 $doc = new DOMDocument();
8 $doc->loadXML('<root/>');
9 var_dump($doc->xmlStandalone);
10 $doc->xmlStandalone = true;
11 var_dump($doc->xmlStandalone);
13 $doc = new DOMDocument();
15 var_dump($doc->xmlStandalone);
16 $doc->xmlStandalone = true;
19 $doc = new DOMDocument();
22 $doc->xmlStandalone = true;
[all …]
H A Dbug81642.phpt9 $doc = new DOMDocument();
10 $doc->appendChild($target = $doc->createElement('test'));
12 var_dump($doc->saveXML());
15 $doc = new DOMDocument();
16 $doc->appendChild($target = $doc->createElement('test'));
18 var_dump($doc->saveXML());
21 $doc = new DOMDocument();
22 $doc->appendChild($target = $doc->createElement('test'));
24 var_dump($doc->saveXML());
27 $doc = new DOMDocument();
[all …]
H A DDOMDocument_saveHTML_variant1.phpt7 $doc = new DOMDocument('1.0');
8 $root = $doc->createElement('html');
9 $root = $doc->appendChild($root);
10 $head = $doc->createElement('head');
12 $title = $doc->createElement('title');
14 $text = $doc->createTextNode('This is the title');
16 echo $doc->saveHTML(NULL), "\n";
17 echo $doc->saveHTML($title), "\n";
H A Dbug77686.phpt8 $doc = new DOMDocument;
9 $doc->loadHTML('<html id="htmlelement"><body id="x">before<div id="y">hello</div>after</body></html…
10 $body = $doc->getElementById('x');
11 $div = $doc->getElementById('y');
12 var_dump($doc->getElementById('y')->textContent);
16 var_dump($doc->getElementById('y'));
20 var_dump($doc->getElementById('y')->textContent);
23 var_dump($doc->getElementById('htmlelement')->textContent);
26 $new_element = $doc->createElement('p');
29 var_dump($doc->getElementById('myp'));
[all …]
H A DDOMDocument_saveXML_XML_SAVE_NO_DECL.phpt11 $doc = new DOMDocument();
12 $doc->loadXML('<root>é</root>');
14 echo $doc->saveXML(options: 0);
15 echo $doc->saveXML(options: LIBXML_NOXMLDECL);
17 $doc->encoding = "UTF-8";
18 echo $doc->saveXML(options: LIBXML_NOXMLDECL);
21 $doc = new DOMDocument();
22 var_dump($doc->saveXML(options: LIBXML_NOXMLDECL));
H A Dbug42082.phpt7 $doc = new DOMDocument();
8 $xpath = new DOMXPath($doc);
15 $doc->loadXML("<element></element>");
16 var_dump($doc->firstChild->nodeValue, empty($doc->firstChild->nodeValue), isset($doc->firstChild->n…
17 var_dump(empty($doc->nodeType), empty($doc->firstChild->nodeType))
H A Dgh14702.phpt7 $doc = new DOMDocument();
8 $doc->loadXML(<<<XML
18 $xi = $doc->createElementNS('http://www.w3.org/2001/XInclude', 'xi:include');
21 $fallback = $doc->createElementNS('http://www.w3.org/2001/XInclude', 'xi:fallback');
23 $child1 = $fallback->appendChild($doc->createElement('fallback-child1'));
24 $child2 = $fallback->appendChild($doc->createElement('fallback-child2'));
26 $xpath = new DOMXPath($doc);
30 $keep = $doc->documentElement->lastElementChild;
32 var_dump(@$doc->xinclude());
33 echo $doc->saveXML();
[all …]
H A DDOMDocument_getElementsByTagName_liveness_write_properties.phpt12 $doc = new DOMDocument;
13 $doc->loadXML($xml);
14 $list = $doc->getElementsByTagName('a');
16 $doc->documentElement->{$field} = 'new_content';
18 print $doc->saveXML();
22 $doc = new DOMDocument;
23 $doc->loadXML($xml);
24 $list = $doc->getElementsByTagNameNS('foo', 'a');
26 $doc->documentElement->firstChild->prefix = 'ns2';
28 print $doc->saveXML();
H A DsetAttributeNodeNS_same_uri_different_prefix.phpt12 $doc = new DOMDocument();
13 $doc->appendChild($doc->createElement('container'));
14 $attribute = $doc->createAttributeNS('http://php.net/ns1', 'foo:hello');
16 var_dump($doc->documentElement->setAttributeNodeNS($attribute)?->nodeValue);
17 echo $doc->saveXML(), "\n";
18 $attribute = $doc->createAttributeNS('http://php.net/ns1', 'bar:hello');
20 var_dump($doc->documentElement->setAttributeNodeNS($attribute)?->nodeValue);
21 echo $doc->saveXML(), "\n";
22 $attribute = $doc->createAttributeNS('http://php.net/ns1', 'hello');
24 var_dump($doc->documentElement->setAttributeNodeNS($attribute)?->nodeValue);
[all …]
/PHP-8.3/ext/dom/tests/delayed_freeing/
H A Ddocument_fragment.phpt7 $doc = new DOMDocument;
8 $frag = $doc->createDocumentFragment();
10 $child = $doc->appendChild($doc->createElement('root'))->appendChild($frag);
11 var_dump($doc->textContent);
12 $doc->documentElement->remove();
13 var_dump($doc->textContent);
14 unset($doc);
17 $doc = new DOMDocument;
18 $doc->appendChild($doc->createElement('container'));
19 $doc->documentElement->appendChild($doc->importNode($frag));
[all …]
H A Dentity_reference.phpt7 $doc = new DOMDocument;
8 $entityRef = $doc->appendChild($doc->createElementNS('some:ns', 'container'))
9 ->appendChild($doc->createEntityReference('nbsp'));
10 echo $doc->saveXML(), "\n";
12 echo $doc->saveXML(), "\n";
17 $doc = new DOMDocument;
18 $doc->loadXML(<<<'XML'
25 $entityRef = $doc->documentElement->appendChild($doc->createEntityReference('test'));
26 echo $doc->saveXML(), "\n";
28 unset($doc);
H A Dnamespace_definition_crash_in_attribute.phpt7 $doc = new DOMDocument;
8 $doc->appendChild($doc->createElement('container'));
9 $child = $doc->documentElement->appendChild($doc->createElementNS('some:ns', 'child'));
10 $child_attr1 = $child->appendChild($doc->createAttributeNS('some:ns2', 'hello'));
12 $child_attr2 = $child->appendChild($doc->createAttribute('hello2'));
15 ->appendChild($doc->createAttributeNS('some:ns', 'hello'));
17 echo $doc->saveXML();
20 echo $doc->saveXML();
31 $doc->documentElement->remove();
37 echo $doc->saveXML($attr3), "\n";
[all …]
H A Dtext_node.phpt7 $doc = new DOMDocument;
9 $text1 = $doc->appendChild($doc->createElement('container'))
10 ->appendChild($doc->createTextNode('my text 1'));
11 $text2 = $doc->documentElement->appendChild($doc->createTextNode('my text 2'));
12 echo $doc->saveXML(), "\n";
14 echo $doc->saveXML(), "\n";
15 echo $doc->saveXML($text1), "\n";
16 echo $doc->saveXML($text2), "\n";
H A Dnamespace_definition_crash.phpt7 $doc = new DOMDocument;
8 $doc->appendChild($doc->createElement('container'));
9 $child = $doc->documentElement->appendChild($doc->createElementNS('some:ns', 'child'));
10 $child_child = $child->appendChild($doc->createElementNS('some:ns', 'x'));
12 echo $doc->saveXML();
15 echo $doc->saveXML();
H A Dcomment_node.phpt7 $doc = new DOMDocument;
8 $comment = $doc->appendChild($doc->createElement('container'))
9 ->appendChild($doc->createComment('my comment'));
10 echo $doc->saveXML(), "\n";
12 echo $doc->saveXML(), "\n";
13 echo $doc->saveXML($comment), "\n";
H A Dnamespace_xmlns_declaration_attribute_variation.phpt7 $doc = new DOMDocument;
8 $doc->loadXML('<?xml version="1.0"?><container xmlns="http://php.net"/>');
9 $doc->documentElement->appendChild($doc->createElementNS('http://php.net', 'example'));
10 echo $doc->saveXML(), "\n";
12 $declaration = $doc->documentElement->getAttributeNode('xmlns');
15 $doc->documentElement->remove();
16 echo $doc->saveXML(), "\n";
19 unset($doc);
H A Dnamespace_xmlns_declaration.phpt7 $doc = new DOMDocument;
8 $doc->loadXML('<?xml version="1.0"?><container xmlns="http://php.net"/>');
9 $doc->documentElement->appendChild($el = $doc->createElementNS('http://php.net', 'example'));
10 echo $doc->saveXML(), "\n";
12 $doc->documentElement->remove();
13 echo $doc->saveXML(), "\n";
/PHP-8.3/ext/dom/tests/gh11830/
H A Dattribute_variation.phpt7 $doc = new DOMDocument;
8 $doc->loadXML(<<<XML
16 $doc->documentElement->firstElementChild->prepend($doc->documentElement->attributes[0]);
22 $doc->documentElement->firstElementChild->append($doc->documentElement->attributes[0]);
28 $doc->documentElement->firstElementChild->before($doc->documentElement->attributes[0]);
34 $doc->documentElement->firstElementChild->after($doc->documentElement->attributes[0]);
40 $doc->documentElement->firstElementChild->replaceWith($doc->documentElement->attributes[0]);
45 echo $doc->saveXML();
/PHP-8.3/ext/dom/tests/createAttributeNS_prefix_conflicts/
H A DsetAttributeNS_with_prefix.phpt8 $doc = new DOMDocument();
9 $doc->appendChild($doc->createElement('container'));
11 var_dump($doc->documentElement->setAttributeNodeNS($doc->createAttributeNS('http://php.net/ns1', 'f…
12 echo $doc->saveXML(), "\n";
13 var_dump($doc->documentElement->setAttributeNodeNS($doc->createAttributeNS('http://php.net/ns2', 'f…
14 echo $doc->saveXML(), "\n";
15 var_dump($doc->documentElement->setAttributeNodeNS($doc->createAttributeNS('http://php.net/ns3', 'f…
16 echo $doc->saveXML(), "\n";
17 var_dump($doc->documentElement->setAttributeNodeNS($doc->createAttributeNS('http://php.net/ns4', 'f…
18 echo $doc->saveXML(), "\n";
H A DsetAttributeNS_without_prefix.phpt8 $doc = new DOMDocument();
9 $doc->appendChild($doc->createElement('container'));
11 var_dump($doc->documentElement->setAttributeNodeNS($doc->createAttributeNS('http://php.net/ns1', 'h…
12 echo $doc->saveXML(), "\n";
13 var_dump($doc->documentElement->setAttributeNodeNS($doc->createAttributeNS('http://php.net/ns2', 'h…
14 echo $doc->saveXML(), "\n";
15 var_dump($doc->documentElement->setAttributeNodeNS($doc->createAttributeNS('http://php.net/ns3', 'h…
16 echo $doc->saveXML(), "\n";
17 var_dump($doc->documentElement->setAttributeNodeNS($doc->createAttributeNS('http://php.net/ns4', 'h…
18 echo $doc->saveXML(), "\n";
H A DsetAttribute_with_prefix.phpt8 $doc = new DOMDocument();
9 $doc->appendChild($doc->createElement('container'));
11 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns1', 'foo…
12 echo $doc->saveXML(), "\n";
13 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns2', 'foo…
14 echo $doc->saveXML(), "\n";
15 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns3', 'foo…
16 echo $doc->saveXML(), "\n";
17 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns4', 'foo…
18 echo $doc->saveXML(), "\n";
H A DsetAttribute_without_prefix.phpt8 $doc = new DOMDocument();
9 $doc->appendChild($doc->createElement('container'));
11 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns1', 'hel…
12 echo $doc->saveXML(), "\n";
13 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns2', 'hel…
14 echo $doc->saveXML(), "\n";
15 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns3', 'hel…
16 echo $doc->saveXML(), "\n";
17 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns4', 'hel…
18 echo $doc->saveXML(), "\n";
H A DsetAttribute_mixed_prefix.phpt8 $doc = new DOMDocument();
9 $doc->appendChild($doc->createElement('container'));
11 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns1', 'foo…
12 var_dump($doc->documentElement->setAttributeNode($doc->createAttributeNS('http://php.net/ns1', 'hel…
13 echo $doc->saveXML(), "\n";

Completed in 55 milliseconds

12345678910>>...12