/PHP-7.1/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(dirname(__FILE__).'/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"; 24 $ret = $dom->encoding = 'NYPHP DOMinatrix'; 27 $ret = $dom->encoding = 'ISO-8859-1'; 29 echo "ISO-8859-1 Encoding Read: {$dom->encoding}\n"; 31 $ret = $dom->encoding = 'UTF-8'; 33 echo "UTF-8 Encoding Read: {$dom->encoding}\n"; 35 $ret = $dom->encoding = 'UTF-16'; [all …]
|
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 | bug36756.phpt | 9 $dom = new DOMDocument(); 10 $dom->loadXML('<root><child/></root>'); 11 $xpath = new DOMXpath($dom); 14 $dom->removeChild($GLOBALS['dom']->firstChild); 18 $dom->loadXML('<root><child/></root>'); 19 $xpath = new DOMXpath($dom); 22 $GLOBALS['dom']->removeChild($GLOBALS['dom']->firstChild);
|
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 | 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 | 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 | bug32615.phpt | 7 $dom = new DomDocument; 8 $frag = $dom->createDocumentFragment(); 10 $dom->appendChild($frag); 11 $root = $dom->documentElement; 19 $node = $dom->createElement('newfirst'); 24 $frag = $dom->createDocumentFragment(); 49 echo $dom->saveXML()."\n"; 65 echo $dom->saveXML()."\n"; 67 $frag = $dom->createDocumentFragment(); 68 $root = $dom->documentElement; [all …]
|
H A D | domxpath.phpt | 23 $dom = new DOMDocument; 24 $dom->loadXML(b'<root xmlns="urn::default"><child>myval</child></root>'); 26 $xpath = new DOMXPath($dom); 45 $root = $dom->documentElement; 46 $root->appendChild($dom->createElementNS("urn::default", "testnode", 3)); 47 $root->appendChild($dom->createElementNS("urn::default", "testnode", 4)); 48 $root->appendChild($dom->createElementNS("urn::default", "testnode", 4)); 49 $root->appendChild($dom->createElementNS("urn::default", "testnode", 5));
|
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_standalone_basic.phpt | 10 // create dom document 11 $dom = new DOMDocument; 15 $dom->loadXML($xml); 16 if(!$dom) { 22 $test = $dom->standalone; 26 $dom->standalone = FALSE; 27 $test = $dom->standalone; 31 $test = $dom->saveXML();
|
H A D | DOMDocument_savexml_basic.phpt | 25 $dom = new DOMDocument(); 26 $dom->loadXML($xml); 27 $root = $dom->documentElement; 31 var_dump($dom->save($filename)); 33 var_dump($result == $dom->saveXML());
|
/PHP-7.1/ext/dom/examples/ |
H A D | note.php | 3 $dom = new domDocument; variable 4 $dom->load('note.xml'); 5 if (!$dom->validate('note.dtd')) { 11 $dom = new domDocument; variable 12 $dom->load('note-invalid.xml'); 13 if (!$dom->validate('note.dtd')) {
|
H A D | dom1.php | 5 $dom = new domDocument; variable 6 $dom->loadxml($xmlstr); 7 if(!$dom) { 17 $rootnode = $dom->documentElement; 70 print $dom->saveXML(); 75 $children = $dom->getElementsByTagname("Silly"); 86 print $dom->savexml();
|
/PHP-7.1/ext/simplexml/examples/ |
H A D | interop.php | 2 $dom = new domDocument; variable 3 $dom->load("book.xml"); 4 if(!$dom) { 10 $s = simplexml_import_dom($dom); 18 $dom = dom_import_simplexml($s); variable 19 $books = $dom->getElementsByTagName("book");
|
/PHP-7.1/ext/simplexml/tests/ |
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(dirname(__FILE__)."/book.xml"); 10 if(!$dom) { 14 $s = simplexml_import_dom($dom);
|
/PHP-7.1/ext/calendar/ |
H A D | easter.c | 33 zend_long year, golden, solar, lunar, pfm, dom, tmp, easter, result; in _cal_easter() local 65 dom = (year + (year/4) + 5) % 7; /* the "Dominical number" - finding a Sunday */ in _cal_easter() 66 if (dom < 0) { in _cal_easter() 67 dom += 7; in _cal_easter() 75 dom = (year + (year/4) - (year/100) + (year/400)) % 7; /* the "Domincal number" */ in _cal_easter() 76 if (dom < 0) { in _cal_easter() 77 dom += 7; in _cal_easter() 93 tmp = (4-pfm-dom) % 7; in _cal_easter()
|
/PHP-7.1/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-7.1/ext/libxml/tests/ |
H A D | bug54138.phpt | 5 if (!extension_loaded('dom')) die('skip dom extension not available'); 18 $dom = new DOMDocument(); 19 $dom->loadXML($xml, LIBXML_BIGLINES); 20 var_dump($dom->getElementsByTagName('bar')->item(0)->getLineNo());
|
H A D | bug54138_1.phpt | 5 if (!extension_loaded('dom')) die('skip dom extension not available'); 19 $dom = new DOMDocument(); 20 $dom->loadXML($xml, LIBXML_BIGLINES); 21 var_dump($dom->getElementsByTagName('bar')->item(0)->getLineNo());
|