2004-05-09 15:07:48 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-06-22 10:39:10 +00:00
|
|
|
<!-- $Revision: 1.8 $ -->
|
2004-12-20 15:57:49 +00:00
|
|
|
<refentry id="function.dom-domdocument-loadxml">
|
|
|
|
<refnamediv>
|
2004-12-31 11:49:57 +00:00
|
|
|
<refname>DOMDocument->loadXML()</refname>
|
2004-12-20 15:57:49 +00:00
|
|
|
<refpurpose>
|
|
|
|
Load XML from a string
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
|
|
|
<classsynopsis>
|
|
|
|
<ooclass><classname>DOMDocument</classname></ooclass>
|
|
|
|
<methodsynopsis>
|
2005-01-17 08:41:34 +00:00
|
|
|
<type>bool</type><methodname>loadXML</methodname>
|
2004-12-20 15:57:49 +00:00
|
|
|
<methodparam><type>string</type><parameter>source</parameter></methodparam>
|
2005-06-22 10:39:10 +00:00
|
|
|
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
|
2004-12-20 15:57:49 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
</classsynopsis>
|
|
|
|
<para>
|
|
|
|
Loads an XML document from a string.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
This method may also be called statically to load and create a
|
|
|
|
<classname>DOMDocument</classname> object. The static invocation may be
|
|
|
|
used when no <classname>DOMDocument</classname> properties need to be set
|
|
|
|
prior to loading.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>source</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The string containing the XML.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2004-12-31 11:49:57 +00:00
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
&return.success;
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2004-12-20 15:57:49 +00:00
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>Creating a Document</title>
|
|
|
|
<programlisting role="php">
|
2004-05-09 15:07:48 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2004-12-20 15:57:49 +00:00
|
|
|
$doc = DOMDocument::loadXML('<root><node/></root>');
|
|
|
|
echo $doc->saveXML();
|
2004-05-09 15:07:48 +00:00
|
|
|
|
|
|
|
$doc = new DOMDocument();
|
2004-12-20 15:57:49 +00:00
|
|
|
$doc->loadXML('<root><node/></root>');
|
|
|
|
echo $doc->saveXML();
|
2004-05-09 15:07:48 +00:00
|
|
|
?>
|
|
|
|
]]>
|
2004-12-20 15:57:49 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
2004-12-31 11:49:57 +00:00
|
|
|
<member><xref linkend="function.dom-domdocument-load" /></member>
|
|
|
|
<member><xref linkend="function.dom-domdocument-save" /></member>
|
|
|
|
<member><xref linkend="function.dom-domdocument-savexml" /></member>
|
2004-12-20 15:57:49 +00:00
|
|
|
</simplelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
2004-05-09 15:07:48 +00:00
|
|
|
|
|
|
|
<!-- 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
|
|
|
|
-->
|