nlopess Mon Jan 19 14:59:16 2004 EDT
Modified files:
/phpdoc/en/reference/tidy/functions tidy-repair-string.xml
Log:
added documentation and example
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-repair-string.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-repair-string.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-repair-string.xml:1.2
phpdoc/en/reference/tidy/functions/tidy-repair-string.xml:1.3
--- phpdoc/en/reference/tidy/functions/tidy-repair-string.xml:1.2 Thu Nov 6
05:15:43 2003
+++ phpdoc/en/reference/tidy/functions/tidy-repair-string.xml Mon Jan 19 14:59:16
2004
@@ -1,6 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.2 $ -->
-<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.tidy-repair-string">
<refnamediv>
<refname>tidy_repair_string</refname>
@@ -14,10 +13,62 @@
<type>bool</type><methodname>tidy_repair_string</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>config_file</parameter></methodparam>
+ <methodparam
choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
</methodsynopsis>
+ <para>
+ This function repairs the given string.
+ </para>
+ <para>
+ <example>
+ <title><function>tidy_repair_string</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ob_start();
+?>
- &warn.undocumented.func;
+<html>
+ <head>
+ <title>test</title>
+ </head>
+ <body>
+ <p>error</i>
+ </body>
+</html>
+<?php
+
+$buffer = ob_get_clean();
+$tidy = tidy_repair_string($buffer);
+
+echo $tidy;
+?>
+]]>
+ </programlisting>
+ <para>
+ The above example will output:
+ </para>
+ <screen>
+<![CDATA[
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html>
+<head>
+<title>test</title>
+</head>
+<body>
+<p>error</p>
+</body>
+</html>
+]]>
+ </screen>
+ </example>
+ </para>
+ <para>
+ See also <function>tidy_parse_file</function>,
+ <function>tidy_parse_string</function> and
+ <function>tidy_repair_file</function>.
+ </para>
+ ¬e.tidy.2only;
</refsect1>
</refentry>