<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.10 $ -->
<refentry xml:id="function.tidy-parse-file" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>tidy_parse_file</refname>
  <refpurpose>Parse markup in file or URI</refpurpose>
 </refnamediv>
 <refsect1>
  <title>Description</title>
  <para>Procedural style:</para>
  <methodsynopsis>
   <type>tidy</type><methodname>tidy_parse_file</methodname>
   <methodparam><type>string</type><parameter>filename</parameter></methodparam>
   <methodparam choice="opt"><type>mixed</type><parameter>config</parameter></methodparam>
   <methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
   <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam>
  </methodsynopsis>
  <para>Object oriented style:</para>
  <methodsynopsis>
   <type>bool</type><methodname>tidy->parseFile</methodname>
   <methodparam><type>string</type><parameter>filename</parameter></methodparam>
   <methodparam choice="opt"><type>mixed</type><parameter>config</parameter></methodparam>
   <methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
   <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam>
  </methodsynopsis>
  <para>
   This function parses the given file.
  </para>
  &tidy.conf-enc;
  <para>
   <example>
    <title><function>tidy_parse_file</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
$tidy = tidy_parse_file('file.html');

$tidy->cleanRepair();

if(!empty($tidy->errorBuffer)) {
    echo "The following errors or warnings occured:\n";
    echo $tidy->errorBuffer;
}
?>
]]>
    </programlisting>
   </example>
  </para>
  &note.tidy.2only;
  <para>
   See also <function>tidy_parse_string</function>,
   <function>tidy_repair_file</function> and
   <function>tidy_repair_string</function>.
  </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
-->