Home
last modified time | relevance | path

Searched refs:doc (Results 26 – 50 of 312) sorted by relevance

12345678910>>...13

/php-src/ext/dom/tests/
H A DsetAttributeNodeNS_same_uri_different_prefix.phpt12 $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 DDOMDocument_save_basic.phpt7 $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 DDOMDocument_saveHTMLFile_formatOutput.phpt11 $doc = new DOMDocument('1.0');
12 $doc->formatOutput = true;
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 $bytes = $doc->saveHTMLFile($filename);
H A Dgh11906.phpt7 $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 Dbug80602_4.phpt8 $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 Dgh13863.phpt25 $doc = new DOMDocument();
26 $doc->preserveWhiteSpace = false;
27 $doc->loadXML($xml);
32 return $doc;
43 $doc = createTestDoc($case);
53 echo $doc->saveXML(), "\n";
57 $doc = createTestDoc($case);
63 $doc->documentElement->childNodes[1]->remove();
67 echo $doc->saveXML(), "\n";
71 $doc = createTestDoc($case);
[all …]
H A DDOMDocument_saveHTML_basic.phpt10 $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 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_saveHTMLFile_invalid_filename.phpt11 $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 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_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 Dbug80602_3.phpt8 $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 DDOMDocument_saveHTMLFile_basic.phpt11 $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');
20 $bytes = $doc->saveHTMLFile($filename);
H A Dclone_nodes.phpt10 $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 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";
/php-src/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;
/php-src/ext/dom/tests/modern/spec/
H A Dattribute_entity_expansion.phpt7 $doc = DOM\HTMLDocument::createEmpty();
8 $elt = $doc->createElement('elt');
9 $doc->appendChild($elt);
11 print $doc->saveHTML($elt) . "\n";
16 print $doc->saveHTML($elt) . "\n";
19 print $doc->saveHTML($elt) . "\n";
23 print $doc->saveHTML($elt) . "\n";
27 print $doc->saveHTML($elt) . "\n";
31 print $doc->saveHTML($elt) . "\n";
36 print $doc->saveHTML($elt) . "\n";
H A Dattribute_entity_expansion_legacy.phpt7 $doc = new DOMDocument;
8 $elt = $doc->createElement('elt');
9 $doc->appendChild($elt);
11 print $doc->saveXML($elt) . "\n";
16 print $doc->saveXML($elt) . "\n";
19 print $doc->saveXML($elt) . "\n";
23 print $doc->saveXML($elt) . "\n";
27 print $doc->saveXML($elt) . "\n";
31 print $doc->saveXML($elt) . "\n";
36 print $doc->saveXML($elt) . "\n";
H A Dxml_serialize_LIBXML_NOEMPTYTAG.phpt8 $doc = DOM\XMLDocument::createFromString('<root><child/><br xmlns="http://www.w3.org/1999/xhtml"/><…
9 echo $doc->saveXML($doc, LIBXML_NOEMPTYTAG), "\n";
11 $doc->formatOutput = true;
12 echo $doc->saveXML($doc, LIBXML_NOEMPTYTAG), "\n";
/php-src/ext/dom/tests/delayed_freeing/
H A Dentity_declaration.phpt7 $doc = new DOMDocument;
8 $doc->loadXML(<<<'XML'
16 $ref1 = $doc->createEntityReference("test");
17 $ref2 = $doc->createEntityReference("myimage");
18 $entity1 = $doc->doctype->entities[0];
19 $entity2 = $doc->doctype->entities[1];
26 $doc->removeChild($doc->doctype);
H A Dprocessing_instruction.phpt7 $doc = new DOMDocument;
8 $pi = $doc->appendChild($doc->createElementNS('some:ns', 'container'))
9 ->appendChild($doc->createProcessingInstruction('hello', 'world'));
10 echo $doc->saveXML(), "\n";
12 echo $doc->saveXML(), "\n";
H A Ddtd_node.phpt7 $doc = new DOMDocument;
8 $dtd = $doc->implementation->createDocumentType('qualified name', 'public', 'system');
9 $doc = $doc->implementation->createDocument('', '', $dtd);
10 echo $doc->saveXML(), "\n";
11 unset($doc);
H A Delement_declaration.phpt7 $doc = new DOMDocument;
8 $doc->loadXML(<<<'XML'
17 $element = $doc->documentElement->firstElementChild;
18 echo $doc->saveXML(), "\n";
22 $doc->removeChild($doc->doctype);
23 echo $doc->saveXML(), "\n";
H A Dgh9628_1.phpt17 $doc = new DOMDocument('1.0', 'UTF-8');
18 $doc->loadXML($html);
20 $outer_span = $doc->documentElement->firstElementChild;
31 $doc = new DOMDocument();
32 $doc->append($doc->importNode($outer_span, true), $doc->importNode($inner_span, true));
33 echo $doc->saveXML();
/php-src/ext/dom/tests/manually_call_constructor/
H A Ddocumentfragment.phpt13 $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();

Completed in 42 milliseconds

12345678910>>...13