Home
last modified time | relevance | path

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

12345678

/PHP-8.0/ext/dom/tests/
H A DDOMDocument_saveHTML_variant1.phpt9 $doc = new DOMDocument('1.0');
10 $root = $doc->createElement('html');
11 $root = $doc->appendChild($root);
12 $head = $doc->createElement('head');
14 $title = $doc->createElement('title');
16 $text = $doc->createTextNode('This is the title');
18 echo $doc->saveHTML(NULL), "\n";
19 echo $doc->saveHTML($title), "\n";
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 DDOMDocument_save_basic.phpt9 $doc = new DOMDocument('1.0');
10 $doc->formatOutput = true;
12 $root = $doc->createElement('book');
14 $root = $doc->appendChild($root);
16 $title = $doc->createElement('title');
19 $text = $doc->createTextNode('This is the title');
24 echo 'Wrote: ' . $doc->save($temp_filename) . ' bytes'; // Wrote: 72 bytes
H A DDOMDocument_saveHTMLFile_formatOutput.phpt13 $doc = new DOMDocument('1.0');
14 $doc->formatOutput = true;
15 $root = $doc->createElement('html');
16 $root = $doc->appendChild($root);
17 $head = $doc->createElement('head');
19 $title = $doc->createElement('title');
21 $text = $doc->createTextNode('This is the title');
23 $bytes = $doc->saveHTMLFile($filename);
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_saveHTML_basic.phpt12 $doc = new DOMDocument('1.0');
13 $root = $doc->createElement('html');
14 $root = $doc->appendChild($root);
15 $head = $doc->createElement('head');
17 $title = $doc->createElement('title');
19 $text = $doc->createTextNode('This is the title');
21 echo $doc->saveHTML();
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_invalid_filename.phpt13 $doc = new DOMDocument('1.0');
14 $root = $doc->createElement('html');
15 $root = $doc->appendChild($root);
16 $head = $doc->createElement('head');
18 $title = $doc->createElement('title');
20 $text = $doc->createTextNode('This is the title');
23 $doc->saveHTMLFile($filename);
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);
H A Dbug80268.phpt10 $doc = new DOMDocument;
11 $doc->loadHTML("<p>foo\0bar</p>");
12 $html = $doc->saveHTML();
16 $doc = new DOMDocument;
17 $doc->loadHTMLFile(__DIR__ . '/80268.html');
18 $html = $doc->saveHTML();
H A DDOMDocument_createAttribute_basic.phpt11 $doc = new DOMDocument;
13 $node = $doc->createElement("para");
14 $newnode = $doc->appendChild($node);
17 $test_attribute = $doc->createAttribute("hahaha");
20 echo $doc->saveXML();
H A Dbug41257.phpt8 $doc = new DOMDocument();
9 $doc->load(__DIR__."/nsdoc.xml");
11 $root = $doc->documentElement;
13 $duri = $doc->lookupNamespaceURI("ns2")."\n";
18 $dpref = $doc->lookupPrefix("http://ns2")."\n";
23 $disdef = $doc->isDefaultNamespace("http://ns")."\n";
H A DDOM4_DOMNode_after_ns.phpt9 $doc = new DOMDocument('1.0', 'utf-8');
10 $doc->formatOutput = true;
12 $root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element');
13 $doc->appendChild($root);
16 $item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house');
19 $item2 = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'street');
22 echo $doc->saveXML(), "\n";
H A DDOM4_DOMNode_before_ns.phpt9 $doc = new DOMDocument('1.0', 'utf-8');
10 $doc->formatOutput = true;
12 $root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element');
13 $doc->appendChild($root);
16 $item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house');
19 $item2 = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'street');
22 echo $doc->saveXML(), "\n";
H A DDOMDocument_saveHTMLFile_basic.phpt13 $doc = new DOMDocument('1.0');
14 $root = $doc->createElement('html');
15 $root = $doc->appendChild($root);
16 $head = $doc->createElement('head');
18 $title = $doc->createElement('title');
20 $text = $doc->createTextNode('This is the title');
22 $bytes = $doc->saveHTMLFile($filename);
H A DDOMDocument_createAttribute_error1.phpt11 $doc = new DOMDocument;
13 $node = $doc->createElement("para");
14 $newnode = $doc->appendChild($node);
17 $failed_test_attribute = $doc->createAttribute("ha haha");
20 echo $doc->saveXML();
H A DDOMDocument_createProcessingInstruction_error.phpt11 $doc = new DOMDocument;
13 $node = $doc->createElement("para");
14 $newnode = $doc->appendChild($node);
18 $doc->createProcessingInstruction( "bla bla bla" );
21 echo $doc->saveXML();
H A DDOM4_DOMNode_append_ns.phpt9 $doc = new DOMDocument('1.0', 'utf-8');
10 $doc->formatOutput = true;
12 $root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element');
13 $doc->appendChild($root);
16 $item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house');
19 echo $doc->saveXML(), "\n";
H A DDOM4_DOMNode_prepend_ns.phpt9 $doc = new DOMDocument('1.0', 'utf-8');
10 $doc->formatOutput = true;
12 $root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element');
13 $doc->appendChild($root);
16 $item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house');
19 echo $doc->saveXML(), "\n";
H A Dbug45251.phpt7 $doc = new DOMDocument;
8 $doc->loadXml(<<<EOF
16 $xpath = new DOMXPath($doc);
18 $bbb = $xpath->query('bbb', $doc->documentElement)->item(0);
20 $ccc = $doc->createElement('ccc');
H A DDOMDocument_preserveWhiteSpace_variations.phpt12 $doc = new DOMDocument;
13 $doc->load(__DIR__."/book.xml");
14 echo $doc->saveXML();
18 $doc = new DOMDocument;
19 $doc->preserveWhiteSpace = false;
20 $doc->load(__DIR__."/book.xml");
21 echo $doc->saveXML();
H A Dbug67474.phpt11 $doc = new DOMDocument();
12 $doc->loadXML('<root xmlns:x="x"><a/><x:a/></root>');
13 $list = $doc->getElementsByTagNameNS('', 'a');
15 $list = $doc->getElementsByTagNameNS(null, 'a');
18 $elem = $doc->documentElement;
H A DDOMImplementation_createDocumentType_basic.phpt13 $doc = $imp->createDocument(null, 'html', $doctype);
14 echo $doc->saveHTML();
17 $doc = $imp->createDocument(null, 'html', $doctype);
18 echo $doc->saveHTML();
21 $doc = $imp->createDocument(null, 'html', $doctype);
22 echo $doc->saveHTML();
/PHP-8.0/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;

Completed in 36 milliseconds

12345678