/PHP-8.2/ext/dom/tests/ |
H A D | bug80602.phpt | 13 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 D | bug80602_2.phpt | 13 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 D | gh11791.phpt | 7 $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 D | bug81642.phpt | 9 $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 D | DOMDocument_saveHTML_variant1.phpt | 7 $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 D | bug77686.phpt | 8 $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 D | bug42082.phpt | 7 $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 D | gh14702.phpt | 7 $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 D | setAttributeNodeNS_same_uri_different_prefix.phpt | 12 $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 D | DOMDocument_save_basic.phpt | 7 $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 D | bug80602_4.phpt | 8 $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 D | gh11906.phpt | 7 $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 D | DOMDocument_saveHTMLFile_formatOutput_gte_2_13.phpt | 15 $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 D | DOMDocument_saveHTML_basic.phpt | 10 $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 D | gh16593.phpt | 8 $doc = new DOMDocument; 9 $root = $doc->appendChild($doc->createElement('root')); 10 $child = $root->appendChild($doc->createElement('child')); 12 $root->replaceChild($doc->createAttribute('foo'), $child); 16 echo $doc->saveXML();
|
H A D | DOMDocument_createProcessingInstruction_basic.phpt | 11 $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 D | DOMDocument_saveHTMLFile_invalid_filename.phpt | 11 $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 D | bug80600.phpt | 8 $doc = new \DOMDocument(); 9 $doc->loadXML('<a><!-- foo --></a>'); 10 $doc->documentElement->firstChild->remove(); 11 echo $doc->saveXML($doc->documentElement);
|
H A D | DOMDocument_saveHTMLFile_formatOutput.phpt | 15 $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 D | bug80602_3.phpt | 8 $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 D | clone_nodes.phpt | 10 $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 D | DOMDocument_strictErrorChecking_basic.phpt | 11 $doc = new DOMDocument; 12 $doc->load(__DIR__."/book.xml"); 14 var_dump($doc->strictErrorChecking); 16 $doc->strictErrorChecking = false; 17 var_dump($doc->strictErrorChecking);
|
/PHP-8.2/ext/dom/tests/gh11830/ |
H A D | attribute_variation.phpt | 7 $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.2/ext/libxml/tests/ |
H A D | bug42112.phpt | 11 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.2/ext/dom/tests/manually_call_constructor/ |
H A D | documentfragment.phpt | 13 $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();
|