upgrade to new style. document the 'filename' parameter

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@195264 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2005-09-06 16:21:50 +00:00
parent 3727bc551b
commit 57edf07813

View file

@ -1,26 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<refentry id='function.simplexml-element-asXML'>
<refnamediv>
<refname>SimpleXMLElement->asXML</refname>
<refpurpose>
Return a well-formed XML string based on SimpleXML element
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>SimpleXMLElement->asXML</methodname>
<void/>
</methodsynopsis>
<para>
The <literal>asXML</literal> method formats the parent object's data
in XML version 1.0.
</para>
<para>
<example>
<title>Get XML</title>
<programlisting role="php">
<!-- $Revision: 1.5 $ -->
<refentry id='function.simplexml-element-asXML'>
<refnamediv>
<refname>SimpleXMLElement->asXML</refname>
<refpurpose>
Return a well-formed XML string based on SimpleXML element
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>SimpleXMLElement->asXML</methodname>
<methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
The <literal>asXML</literal> method formats the parent object's data
in XML version 1.0.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
If specified, the function writes the data to the file rather than
returning it.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
If the <parameter>filename</parameter> isn't specified, this function
returns a <type>string</type> on success and &false; on error. If the
parameter is specified, it returns &true; if the file was written
successfully and &false; otherwise.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Get XML</title>
<programlisting role="php">
<![CDATA[
<?php
$string = <<<XML
@ -41,18 +72,18 @@ echo $xml->asXML(); // <?xml ... <a><b><c>text</c><c>stuff</c> ...
?>
]]>
</programlisting>
</example>
</para>
<para>
<literal>asXML</literal> also works on Xpath results:
<example>
<title>
Using asXML() on
<link linkend="function.simplexml-element-xpath">Xpath</link>
results
</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<literal>asXML</literal> also works on Xpath results:
<example>
<title>
Using asXML() on
<link linkend="function.simplexml-element-xpath">Xpath</link>
results
</title>
<programlisting role="php">
<![CDATA[
<?php
// Continued from example XML above.
@ -65,11 +96,11 @@ while(list( , $node) = each($result)) {
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables: