nlopess         Tue Feb 15 08:47:11 2005 EDT

  Modified files:              
    /phpdoc/en/reference/libxml/functions       
                                                libxml-use-internal-errors.xml 
  Log:
  start writing libxml docs
  
http://cvs.php.net/diff.php/phpdoc/en/reference/libxml/functions/libxml-use-internal-errors.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc/en/reference/libxml/functions/libxml-use-internal-errors.xml
diff -u phpdoc/en/reference/libxml/functions/libxml-use-internal-errors.xml:1.1 
phpdoc/en/reference/libxml/functions/libxml-use-internal-errors.xml:1.2
--- phpdoc/en/reference/libxml/functions/libxml-use-internal-errors.xml:1.1     
Mon Feb 14 13:01:01 2005
+++ phpdoc/en/reference/libxml/functions/libxml-use-internal-errors.xml Tue Feb 
15 08:47:10 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
 <refentry id="function.libxml-use-internal-errors">
  <refnamediv>
   <refname>libxml_use_internal_errors</refname>
@@ -10,13 +10,15 @@
  <refsect1 role="description">
   &reftitle.description;
   <methodsynopsis>
-   <type>void</type><methodname>libxml_use_internal_errors</methodname>
-   
<methodparam><type>boolean</type><parameter>use_errors</parameter></methodparam>
+   <type>bool</type><methodname>libxml_use_internal_errors</methodname>
+   <methodparam 
choice="opt"><type>bool</type><parameter>use_errors</parameter></methodparam>
   </methodsynopsis>
-
-  &warn.undocumented.func;
-
+  <para>
+   <function>libxml_use_internal_errors</function> allows you to disable
+   standard libxml errors and enable user error handling.
+  </para>
  </refsect1>
+
  <refsect1 role="parameters">
   &reftitle.parameters;
   <para>
@@ -25,66 +27,71 @@
      <term><parameter>use_errors</parameter></term>
       <listitem>
        <para>
-        Its description
+        Whether to enable user error handling. Defaults to &false;.
        </para>
       </listitem>
      </varlistentry>
    </variablelist>
   </para>
  </refsect1>
+
  <refsect1 role="returnvalues">
   &reftitle.returnvalues;
   <para>
-   What the function returns, first on success, then on failure. See
-   also the &return.success; entity
+   This function returns the previous value of
+   <parameter>use_errors</parameter>.
   </para>
  </refsect1>
 
- <!-- Use when examples exist
  <refsect1 role="examples">
   &reftitle.examples;
   <para>
    <example>
-    <title><function>A libxml-use-internal-errors example</title>
+    <title>A <function>libxml_use_internal_errors</function> example</title>
     <para>
-     Any text that describes the purpose of the example, or
-     what goes on in the example should go here (inside the
-     <example> tag, not out
+     This example demonstrates the basic usage of libxml errors and the value
+     returned by <function>libxml_use_internal_errors</function>.
     </para>
     <programlisting role="php">
 <![CDATA[
 <?php
-if ($anexample === true) {
-    echo 'Use the PEAR Coding Standards';
+
+// enable user error handling
+var_dump(libxml_use_internal_errors(true));
+
+$doc = DOMDocument::load('file.xml');
+
+if (!$doc) {
+  $errors = libxml_get_errors();
+  foreach ($errors as $error) {
+       // handle errors here
+  }
+
+  libxml_clear_errors();
 }
+
 ?>
 ]]>
     </programlisting>
     &example.outputs;
     <screen>
 <![CDATA[
-Use the PEAR Coding Standards
+bool(false)
 ]]>
     </screen>
    </example>
   </para>
  </refsect1>
- -->
 
-
- <!-- Use when adding See Also links
  <refsect1 role="seealso">
   &reftitle.seealso;
   <para>
    <simplelist>
-    <member><function></function></member>
-    <member>Or <link linkend="somethingelse">something else</link></member>
+    <member><function>libxml_clear_errors</function></member>
+    <member><function>libxml_get_errors</function></member>
    </simplelist>
   </para>
  </refsect1>
- -->
-
-
 </refentry>
 
 <!-- Keep this comment at the end of the file

Reply via email to