/PHP-8.0/ext/dom/tests/ |
H A D | bug38474.phpt | 15 $dom = new DomDocument(); 16 $dom->loadXML($xml); 17 echo $dom->firstChild->getAttribute('type')."\n"; 20 $dom->firstChild->setAttribute('pre:type', 'bar2'); 21 $dom->firstChild->setAttribute('type', 'foo2'); 22 $dom->firstChild->setAttribute('post:type', 'baz'); 25 echo $dom->firstChild->getAttribute('type')."\n"; 29 $dom->firstChild->removeAttribute('pre:type'); 30 $dom->firstChild->removeAttribute('type'); 32 echo $dom->firstChild->getAttribute('type')."\n"; [all …]
|
H A D | bug65196.phpt | 5 extension_loaded("dom") or die("skip need ext/dom"); 9 $dom = new DOMDocument(); 11 $frag1 = $dom->createDocumentFragment(); 12 var_dump($dom->saveHTML($frag1)); 14 $frag2 = $dom->createDocumentFragment(); 15 $div = $dom->createElement('div'); 16 $div->appendChild($dom->createElement('span')); 18 $frag2->appendChild($dom->createElement('div')); 19 $frag2->appendChild($dom->createElement('div')); 20 var_dump($dom->saveHTML($frag2));
|
H A D | DOMNode_hasChildNodes.phpt | 11 $dom = new DOMDocument(); 13 $dom->loadXML('<root/>'); 15 echo $dom->saveXML(); 18 var_dump($dom->documentElement->hasChildNodes()); 21 $dom->loadXML('<root><a/></root>'); 22 var_dump($dom->documentElement->hasChildNodes()); 25 $dom->documentElement->removeChild($dom->documentElement->firstChild); 26 echo $dom->saveXML(); 29 var_dump($dom->documentElement->hasChildNodes()); 32 $dom->loadXML('<root><a/><b/></root>'); [all …]
|
H A D | DOMDocument_validate_external_dtd.phpt | 12 // reusing existing xml: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.xml?view=co&conten… 13 // reusing existing dtd: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.ent?view=co&conten… 14 $dom = new DOMDocument('1.0'); 15 $dom->substituteEntities = true; 16 $dom->load(__DIR__.'/dom.xml'); 17 var_dump($dom->validate());
|
H A D | DOMComment_replaceData_basic.phpt | 11 $dom = new DomDocument(); 12 $comment = $dom->createComment('test-comment'); 14 $dom->appendChild($comment); 15 echo $dom->saveXML(); 18 $dom = new DomDocument(); 19 $comment = $dom->createComment('test-comment'); 21 $dom->appendChild($comment); 22 echo $dom->saveXML();
|
H A D | DOMDocument_encoding_basic.phpt | 13 $dom = new DOMDocument; 14 $dom->loadXML($xmlstr); 16 if( !$dom ) 22 echo "Empty Encoding Read: '{$dom->encoding}'\n"; 25 $ret = $dom->encoding = 'NYPHP DOMinatrix'; 31 $ret = $dom->encoding = 'ISO-8859-1'; 33 echo "ISO-8859-1 Encoding Read: {$dom->encoding}\n"; 35 $ret = $dom->encoding = 'UTF-8'; 37 echo "UTF-8 Encoding Read: {$dom->encoding}\n"; 39 $ret = $dom->encoding = 'UTF-16'; [all …]
|
H A D | bug36756.phpt | 9 $dom = new DOMDocument(); 10 $dom->loadXML('<root><child/></root>'); 11 $xpath = new DOMXpath($dom); 14 $dom->removeChild($GLOBALS['dom']->firstChild); 17 $dom->loadXML('<root><child/></root>'); 18 $xpath = new DOMXpath($dom); 21 $GLOBALS['dom']->removeChild($GLOBALS['dom']->firstChild);
|
H A D | DOM4_ParentNode_append.phpt | 11 $dom = new DOMDocument; 12 $dom->loadXML('<test><mark/><mark /><mark /></test>'); 14 $element = $dom->documentElement; 16 $dom->createElement('element', 'content'), 20 var_dump($dom->documentElement->childElementCount); 24 $dom->createElement('element', 'content'), 27 var_dump($dom->documentElement->childElementCount);
|
H A D | DOMDocument_validate_on_parse_basic.phpt | 13 $dom = new DOMDocument; 14 $dom->loadXML($xmlstr); 16 if( !$dom ) 23 var_dump($dom->validateOnParse); 25 $dom->validateOnParse = TRUE; 27 var_dump($dom->validateOnParse); 29 $dom->validateOnParse = FALSE; 31 var_dump($dom->validateOnParse);
|
H A D | DOMNode_insertBefore.phpt | 11 $dom = new DOMDocument(); 12 $dom->loadXML('<root/>'); 13 echo $dom->saveXML(); 15 $e1 = $dom->createElement("A"); 16 $e2 = $dom->documentElement->appendChild($dom->createElement("B")); 19 echo $dom->saveXML(); 23 echo $dom->saveXML();
|
H A D | DOMDocument_documentURI_basic.phpt | 10 // create dom document 11 $dom = new DOMDocument; 15 $dom->loadXML($xml); 16 if(!$dom) { 22 $test = $dom->documentURI; 26 $dom->documentURI = 'http://dom.example.org/example.xml'; 27 $test = $dom->documentURI; 38 string(34) "http://dom.example.org/example.xml"
|
H A D | bug79451.phpt | 7 $dom = new \DOMDocument(); 8 $dom->loadHTML("<!DOCTYPE html><p>hello</p>"); 11 $dom->replaceChild($dt, $dom->doctype); 13 var_dump($dom->doctype->name); 14 echo $dom->saveXML();
|
H A D | DOMDocument_validate_on_parse_variation.phpt | 18 $dom = new DOMDocument; 19 $dom->resolveExternals = TRUE; 21 $dom->validateOnParse = FALSE; 23 $dom->loadXML($XMLStringGood); 26 $BogusElement = $dom->createElement('NYPHP','DOMinatrix'); 27 $Body = $dom->getElementsByTagName('from')->item(0); 29 $XMLStringBad = $dom->saveXML(); 32 $dom->validateOnParse = TRUE; 33 $dom->loadXML($XMLStringBad);
|
H A D | DOM4_ParentNode_append_with_attributes.phpt | 9 $dom = new DOMDocument; 10 $dom->loadXML('<test attr-one="21"/>'); 12 $replacement = $dom->createAttribute('attr-one'); 14 $addition = $dom->createAttribute('attr-two'); 17 $element = $dom->documentElement; 25 echo $dom->saveXML();
|
H A D | DOM4_ParentNode_Fragment.phpt | 9 $dom = new DOMDocument; 10 $dom->loadXML('<test></test>'); 12 $fragment = $dom->createDocumentFragment(); 13 $fragment->appendChild($dom->createTextNode('foo')); 14 $fragment->appendChild($dom->createElement('bar', 'FirstElement')); 15 $fragment->appendChild($dom->createElement('bar', 'LastElement')); 16 $fragment->appendChild($dom->createTextNode('bar'));
|
H A D | DOM4_DOMNode_after.phpt | 9 $dom = new DOMDocument; 10 $dom->loadXML('<test><mark>first</mark><mark>second</mark></test>'); 12 $element = $dom->documentElement->firstElementChild; 13 $secondMark = $dom->documentElement->lastElementChild; 17 $dom->createElement('inserted-after', 'content') 22 print_node_list_compact($dom->documentElement->childNodes);
|
H A D | DOM4_DOMNode_before.phpt | 9 $dom = new DOMDocument; 10 $dom->loadXML('<test><mark>first</mark><mark>second</mark></test>'); 12 $element = $dom->documentElement->firstElementChild; 13 $secondMark = $dom->documentElement->lastElementChild; 16 $dom->createElement('inserted-before', 'content'), 22 print_node_list_compact($dom->documentElement->childNodes);
|
H A D | DOM4_DOMNode_replaceWith.phpt | 9 $dom = new DOMDocument; 10 $dom->loadXML('<test><mark>first</mark><mark>second</mark></test>'); 12 $element = $dom->documentElement->firstChild; 14 $dom->createElement('element', 'content'), 18 print_node_list_compact($dom->documentElement->childNodes);
|
H A D | DOMComment_appendData_basic.phpt | 11 $dom = new DomDocument(); 12 $comment = $dom->createComment('test-comment'); 14 $dom->appendChild($comment); 15 $dom->saveXML(); 16 echo $dom->saveXML();
|
H A D | DOMDocument_resolveExternals_basic.phpt | 10 // create dom document 11 $dom = new DOMDocument; 16 $dom->loadXML($xml); 17 if(!$dom) { 23 $test = $dom->resolveExternals; 27 $dom->resolveExternals = TRUE; 28 $test = $dom->resolveExternals; 36 $dom->loadXML($xml); 37 $test = $dom->saveXML();
|
H A D | bug78025.phpt | 5 if (!extension_loaded('dom')) die('skip dom extension not available'); 10 $dom = new DOMDocument; 11 $dom->loadHTML($htm); 12 var_dump($dom->doctype->name);
|
H A D | DOM4_ParentNode_prepend.phpt | 11 $dom = new DOMDocument; 12 $dom->loadXML('<test><mark/><mark><nested /></mark><mark/></test>'); 14 $element = $dom->documentElement; 17 $dom->createElement('element', 'content'), 24 $element = $dom->documentElement; 26 $dom->createElement('element', 'content'),
|
/PHP-8.0/ext/reflection/tests/ |
H A D | ReflectionExtension_getDependencies_basic.phpt | 7 if (!extension_loaded("dom")) die("skip no dom extension"); 11 $dom = new ReflectionExtension('dom'); 12 var_dump($dom->getDependencies());
|
/PHP-8.0/ext/simplexml/tests/ |
H A D | bug81325.phpt | 6 if (!extension_loaded('dom')) die('skip dom not available'); 10 $dom = new DOMDocument; 11 $dom->loadXML("foo"); 12 $xml = simplexml_import_dom($dom);
|
H A D | simplexml_import_dom.phpt | 5 <?php if (!extension_loaded("dom")) die("skip dom extension not loaded"); ?> 8 $dom = new domDocument; 9 $dom->load(__DIR__."/book.xml"); 10 if(!$dom) { 14 $s = simplexml_import_dom($dom);
|