mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322237 c90b9560-bf6c-de11-be94-00142212c4b1
104 lines
2.7 KiB
XML
104 lines
2.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="domdocument.loadhtmlfile" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>DOMDocument::loadHTMLFile</refname>
|
|
<refpurpose>
|
|
Load HTML from a file
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>DOMDocument::loadHTMLFile</methodname>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
The function parses the HTML document in the file named
|
|
<parameter>filename</parameter>. Unlike loading XML, HTML does not have
|
|
to be well-formed to load.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>filename</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The path to the HTML file.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success; If called statically, returns a
|
|
<classname>DOMDocument</classname>&return.falseforfailure;.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
If an empty string is passed as the <parameter>filename</parameter>
|
|
or an empty file is named, a warning will be generated. This warning
|
|
is not generated by libxml and cannot be handled using <link
|
|
linkend="function.libxml-use-internal-errors">libxml's error handling
|
|
functions</link>.
|
|
</para>
|
|
&dom.allowstatic;
|
|
&dom.malformederror;
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Creating a Document</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$doc = new DOMDocument();
|
|
$doc->loadHTMLFile("filename.html");
|
|
echo $doc->saveHTML();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>DOMDocument::loadHTML</methodname></member>
|
|
<member><methodname>DOMDocument::saveHTML</methodname></member>
|
|
<member><methodname>DOMDocument::saveHTMLFile</methodname></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|