Home
last modified time | relevance | path

Searched refs:dom (Results 1 – 25 of 148) sorted by relevance

123456

/PHP-7.2/ext/dom/tests/
H A Dbug38474.phpt15 $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 Dbug65196.phpt5 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 DDOMNode_hasChildNodes.phpt11 $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 DDOMDocument_validate_external_dtd.phpt12 // 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 DDOMComment_replaceData_basic.phpt11 $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 DDOMDocument_encoding_basic.phpt13 $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 DDOMNode_insertBefore.phpt11 $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 DDOMDocument_validate_on_parse_basic.phpt13 $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 Dbug36756.phpt9 $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 DDOMDocument_documentURI_basic.phpt10 // 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 DDOMDocument_validate_on_parse_variation.phpt18 $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 DDOMDocument_resolveExternals_basic.phpt10 // 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 Dbug32615.phpt7 $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 Ddomxpath.phpt23 $dom = new DOMDocument;
24 $dom->loadXML('<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 DDOMComment_appendData_basic.phpt11 $dom = new DomDocument();
12 $comment = $dom->createComment('test-comment');
14 $dom->appendChild($comment);
15 $dom->saveXML();
16 echo $dom->saveXML();
H A Dbug78025.phpt5 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 DDOMDocument_standalone_basic.phpt10 // 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();
/PHP-7.2/ext/dom/examples/
H A Dnote.php3 $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 Ddom1.php5 $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.2/ext/simplexml/examples/
H A Dinterop.php2 $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.2/ext/simplexml/tests/
H A Dsimplexml_import_dom.phpt5 <?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.2/ext/calendar/
H A Deaster.c33 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.2/ext/reflection/tests/
H A DReflectionExtension_getDependencies_basic.phpt7 if (!extension_loaded("dom")) die("skip no dom extension");
11 $dom = new ReflectionExtension('dom');
12 var_dump($dom->getDependencies());
/PHP-7.2/ext/libxml/tests/
H A Dbug54138.phpt5 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 Dbug54138_1.phpt5 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());

Completed in 21 milliseconds

123456