/php-src/ext/dom/tests/ |
H A D | setAttributeNodeNS_same_uri_different_prefix.phpt | 12 $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 D | DOMDocument_save_basic.phpt | 7 $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 D | DOMDocument_saveHTMLFile_formatOutput.phpt | 11 $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 D | gh11906.phpt | 7 $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 D | bug80602_4.phpt | 8 $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 D | gh13863.phpt | 25 $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 D | DOMDocument_saveHTML_basic.phpt | 10 $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 D | DOMDocument_createProcessingInstruction_basic.phpt | 11 $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 D | DOMDocument_saveHTMLFile_invalid_filename.phpt | 11 $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 D | bug80600.phpt | 8 $doc = new \DOMDocument(); 9 $doc->loadXML('<a><!-- foo --></a>'); 10 $doc->documentElement->firstChild->remove(); 11 echo $doc->saveXML($doc->documentElement);
|
H A D | DOMDocument_strictErrorChecking_basic.phpt | 11 $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 D | bug80602_3.phpt | 8 $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 D | DOMDocument_saveHTMLFile_basic.phpt | 11 $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 D | clone_nodes.phpt | 10 $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 D | bug41257.phpt | 8 $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 D | bug42112.phpt | 11 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 D | attribute_entity_expansion.phpt | 7 $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 D | attribute_entity_expansion_legacy.phpt | 7 $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 D | xml_serialize_LIBXML_NOEMPTYTAG.phpt | 8 $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 D | entity_declaration.phpt | 7 $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 D | processing_instruction.phpt | 7 $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 D | dtd_node.phpt | 7 $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 D | element_declaration.phpt | 7 $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 D | gh9628_1.phpt | 17 $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 D | documentfragment.phpt | 13 $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();
|