Home
last modified time | relevance | path

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

12345678910

/PHP-8.1/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 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 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 …]
H A DDOMDocument_save_basic.phpt7 $doc = new DOMDocument('1.0');
8 $doc->formatOutput = true;
10 $root = $doc->createElement('book');
12 $root = $doc->appendChild($root);
14 $title = $doc->createElement('title');
17 $text = $doc->createTextNode('This is the title');
22 echo 'Wrote: ' . $doc->save($temp_filename) . ' bytes'; // Wrote: 72 bytes
H A Dbug80602_4.phpt8 $doc = new \DOMDocument();
9 $doc->loadXML('<a>foo<last/>bar</a>');
10 $foo = $doc->firstChild->firstChild;
11 $bar = $doc->firstChild->lastChild;
15 var_dump($doc->saveXML());
19 var_dump($doc->saveXML());
23 var_dump($doc->saveXML());
H A Dgh11906.phpt7 $doc = new DOMDocument;
8 $doc->loadXML(<<<XML
15 $container = $doc->documentElement;
18 $test = $doc->createElement('foo');
21 echo $doc->saveXML();
23 echo $doc->saveXML($test), "\n";
26 echo $doc->saveXML();
28 echo $doc->saveXML($test), "\n";
H A DDOMDocument_saveHTMLFile_formatOutput_gte_2_13.phpt15 $doc = new DOMDocument('1.0');
16 $doc->formatOutput = true;
17 $root = $doc->createElement('html');
18 $root = $doc->appendChild($root);
19 $head = $doc->createElement('head');
21 $title = $doc->createElement('title');
23 $text = $doc->createTextNode('This is the title');
25 $bytes = $doc->saveHTMLFile($filename);
H A DDOMDocument_saveHTML_basic.phpt10 $doc = new DOMDocument('1.0');
11 $root = $doc->createElement('html');
12 $root = $doc->appendChild($root);
13 $head = $doc->createElement('head');
15 $title = $doc->createElement('title');
17 $text = $doc->createTextNode('This is the title');
19 echo $doc->saveHTML();
H A DDOMDocument_createProcessingInstruction_basic.phpt11 $doc = new DOMDocument;
13 $node = $doc->createElement("para");
14 $newnode = $doc->appendChild($node);
17 $doc->createProcessingInstruction( "blablabla" );
21 $doc->createProcessingInstruction( "blablabla", "datadata" );
24 echo $doc->saveXML();
H A DDOMDocument_saveHTMLFile_invalid_filename.phpt11 $doc = new DOMDocument('1.0');
12 $root = $doc->createElement('html');
13 $root = $doc->appendChild($root);
14 $head = $doc->createElement('head');
16 $title = $doc->createElement('title');
18 $text = $doc->createTextNode('This is the title');
21 $doc->saveHTMLFile($filename);
H A Dbug80600.phpt8 $doc = new \DOMDocument();
9 $doc->loadXML('<a><!-- foo --></a>');
10 $doc->documentElement->firstChild->remove();
11 echo $doc->saveXML($doc->documentElement);
H A DDOMDocument_saveHTMLFile_formatOutput.phpt15 $doc = new DOMDocument('1.0');
16 $doc->formatOutput = true;
17 $root = $doc->createElement('html');
18 $root = $doc->appendChild($root);
19 $head = $doc->createElement('head');
21 $title = $doc->createElement('title');
23 $text = $doc->createTextNode('This is the title');
25 $bytes = $doc->saveHTMLFile($filename);
H A Dbug80602_3.phpt8 $doc = new \DOMDocument();
9 $doc->loadXML('<a>foo<last/></a>');
10 $target = $doc->documentElement->lastChild;
11 $target->before('bar', $doc->documentElement->firstChild, 'baz');
12 echo $doc->saveXML($doc->documentElement), "\n";
15 $doc = new \DOMDocument();
16 $doc->loadXML('<a>foo<last/></a>');
17 $target = $doc->documentElement->lastChild;
19 $target->after('bar', $doc->documentElement->firstChild, 'baz');
20 echo $doc->saveXML($doc->documentElement), "\n";
H A Dclone_nodes.phpt10 $doc = new DOMDocument;
11 $doc->loadXML('<foo xmlns="http://php.net/test" xmlns:foo="urn:foo" />');
13 $attr = $doc->documentElement->getAttributeNode('xmlns');
20 unset($doc);
28 $doc = new DOMDocument;
29 $doc->loadXML('<foo><bar/></foo>');
31 $bar = $doc->documentElement->firstChild;
38 $doc->firstElementChild->remove();
39 unset($doc);
H A DDOMDocument_strictErrorChecking_basic.phpt11 $doc = new DOMDocument;
12 $doc->load(__DIR__."/book.xml");
14 var_dump($doc->strictErrorChecking);
16 $doc->strictErrorChecking = false;
17 var_dump($doc->strictErrorChecking);
H A DDOMDocument_preserveWhiteSpace_basic.phpt11 $doc = new DOMDocument;
12 $doc->load(__DIR__."/book.xml");
14 var_dump($doc->preserveWhiteSpace);
16 $doc->preserveWhiteSpace = false;
17 var_dump($doc->preserveWhiteSpace);
/PHP-8.1/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();
H A Ddocument_variation.phpt15 $doc = new DOMDocument;
16 $doc->loadXML(<<<XML
24 $testElement = $doc->documentElement->firstElementChild->nextElementSibling->firstElementChild;
27 $doc->documentElement->firstElementChild->prepend($testElement, $otherElement);
33 $doc->documentElement->firstElementChild->append($testElement, $otherElement);
39 $doc->documentElement->firstElementChild->before($testElement, $otherElement);
45 $doc->documentElement->firstElementChild->after($testElement, $otherElement);
51 $doc->documentElement->firstElementChild->replaceWith($testElement, $otherElement);
57 echo $doc->saveXML();
/PHP-8.1/ext/libxml/tests/
H A Dbug42112.phpt11 function remove_node($doc) {
12 $node = $doc->getElementById( 'id1' );
17 $doc = new DOMDocument();
18 $doc->loadXML($xml);
20 remove_node($doc);
22 $node = $doc->getElementById( 'id1' );
26 $root = $doc->documentElement;
/PHP-8.1/ext/dom/tests/manually_call_constructor/
H A Ddocumentfragment.phpt13 $doc = new DOMDocument();
14 $doc->loadXML(<<<XML
18 @$doc->documentElement->appendChild($fragment);
19 echo $doc->saveXML();
22 @$doc->documentElement->appendChild($fragment);
23 echo $doc->saveXML();

Completed in 24 milliseconds

12345678910