Remove static calls which are non E_STRICT compliant

formatOutput doesn't affect DomDocument->saveHTML()


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@211537 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2006-04-17 12:59:17 +00:00
parent bdccb6e026
commit 66c1780e8d
6 changed files with 11 additions and 25 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry id="function.dom-domdocument-load">
<refnamediv>
<refname>DOMDocument->load()</refname>
@ -56,9 +56,6 @@
<programlisting role="php">
<![CDATA[
<?php
$doc = DOMDocument::load('book.xml');
echo $doc->saveXML();
$doc = new DOMDocument();
$doc->load('book.xml');
echo $doc->saveXML();

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.dom-domdocument-loadhtml">
<refnamediv>
<refname>DOMDocument->loadHTML()</refname>
@ -54,9 +54,6 @@
<programlisting role="php">
<![CDATA[
<?php
$doc = DOMDocument::loadHTML("<html><body>Test<br></body></html>");
echo $doc->saveHTML();
$doc = new DOMDocument();
$doc->loadHTML("<html><body>Test<br></body></html>");
echo $doc->saveHTML();

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.dom-domdocument-loadhtmlfile">
<refnamediv>
<refname>DOMDocument->loadHTMLFile()</refname>
@ -57,12 +57,9 @@
<programlisting role="php">
<![CDATA[
<?php
$doc = DOMDocument::loadHTMLFile("filename.html");
print $doc->saveHTML();
$doc = new DOMDocument();
$doc->loadHTMLFile("filename.html");
print $doc->saveHTML();
echo $doc->saveHTML();
?>
]]>
</programlisting>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry id="function.dom-domdocument-loadxml">
<refnamediv>
<refname>DOMDocument->loadXML()</refname>
@ -56,9 +56,6 @@
<programlisting role="php">
<![CDATA[
<?php
$doc = DOMDocument::loadXML('<root><node/></root>');
echo $doc->saveXML();
$doc = new DOMDocument();
$doc->loadXML('<root><node/></root>');
echo $doc->saveXML();

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.dom-domdocument-savehtml">
<refnamediv>
<refname>DOMDocument->saveHTML()</refname>
@ -37,8 +37,6 @@
<?php
$doc = new DOMDocument('1.0');
// we want a nice output
$doc->formatOutput = true;
$root = $doc->createElement('html');
$root = $doc->appendChild($root);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.dom-domdocument-savexml">
<refnamediv>
<refname>DOMDocument->saveXML()</refname>
@ -117,10 +117,10 @@ $title = $root->appendChild($title);
$text = $doc->createTextNode('This is the title');
$text = $title->appendChild($text);
echo "Retrieving all the document:\n";
echo "Saving all the document:\n";
echo $doc->saveXML() . "\n";
echo "Retrieving only the title part:\n";
echo "Saving only the title part:\n";
echo $doc->saveXML($title);
?>
@ -129,13 +129,13 @@ echo $doc->saveXML($title);
&example.outputs;
<screen>
<![CDATA[
Retrieving all the document:
Saving all the document:
<?xml version="1.0"?>
<book>
<title>This is the title</title>
</book>
Retrieving only the title part:
Saving only the title part:
<title>This is the title</title>
]]>
</screen>