php-doc-en/reference/dom/functions/dom-domdocument-load.xml
Richard Quadling ec5511c572 Moved warning to errors section.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@244793 c90b9560-bf6c-de11-be94-00142212c4b1
2007-10-25 09:41:36 +00:00

111 lines
2.9 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.15 $ -->
<refentry xml:id="function.dom-domdocument-load" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>DOMDocument->load()</refname>
<refpurpose>
Load XML from a file
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>DOMDocument</classname></ooclass>
<methodsynopsis>
<type>mixed</type><methodname>load</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
Loads an XML document from a file.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<warning>
<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 libxml's error
handling functions.
</para>
</warning>
<para>
The path to the XML document.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success; If called statically, returns a DOMDocument but also
causes an E_STRICT warning.
</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 libxml's error
handling functions.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Creating a Document</title>
<programlisting role="php">
<![CDATA[
<?php
$doc = new DOMDocument();
$doc->load('book.xml');
echo $doc->saveXML();
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.dom-domdocument-loadxml" /></member>
<member><xref linkend="function.dom-domdocument-save" /></member>
<member><xref linkend="function.dom-domdocument-savexml" /></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:"../../../../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
-->