1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.8 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<reference id="ref.tidy">
<title>Tidy Functions</title>
<titleabbrev>tidy</titleabbrev>
<partintro>
<section id="tidy.intro">
&reftitle.intro;
<para>
Tidy is a binding for the Tidy HTML clean and repair utility which
allows you to not only clean and otherwise manipulate HTML documents,
but also traverse the document tree.
</para>
</section>
<section id="tidy.requirements">
&reftitle.required;
<para>
To use Tidy, you will need libtidy installed, available
on the tidy homepage <ulink url="&url.tidy;">&url.tidy;</ulink>.
</para>
</section>
&reference.tidy.configure;
&reference.tidy.ini;
<section id="tidy.resources">
&reftitle.resources;
&no.resource;
</section>
<section id='tidy.classes'>
&reftitle.classes;
<section id='tidy.class.tidynode'>
<title><classname>tidyNode</classname></title>
<section id='tidy.class.tidynode.methods'>
&reftitle.methods;
<itemizedlist>
<listitem>
<para><xref linkend='function.tidyNode-hasChildren' /> - Returns &true; if the current node has childrens</para>
</listitem>
<listitem>
<para><xref linkend='function.tidyNode-hasSiblings' /> - Returns &true; if the current node has siblings</para>
</listitem>
<listitem>
<para><xref linkend='function.tidyNode-isAsp' /> - Returns &true; if the current node is ASP code</para>
</listitem>
<listitem>
<para><xref linkend='function.tidyNode-isComment' /> - Returns &true; if the current node is a comment</para>
</listitem>
<listitem>
<para><xref linkend='function.tidyNode-isHtml' /> - Returns &true; if the current node is HTML</para>
</listitem>
<listitem>
<para><xref linkend='function.tidyNode-isJste' /> - Returns &true; if the current node is JSTE</para>
</listitem>
<listitem>
<para><xref linkend='function.tidyNode-isPhp' /> - Returns &true; if the current node is PHP</para>
</listitem>
<listitem>
<para><xref linkend='function.tidyNode-isText' /> - Returns &true; if the current node is Text (no markup)</para>
</listitem>
</itemizedlist>
</section>
<section id='tidy.class.tidynode.properties'>
&reftitle.properties;
<itemizedlist>
<listitem>
<para>value - the value of the node (e.g. the html text)</para>
</listitem>
<listitem>
<para>name - the name of the tag (e.g. html, a, etc..)</para>
</listitem>
<listitem>
<para>type - the type of the node (one of the constants above, e.g. <constant>TIDY_NODETYPE_PHP</constant>)</para>
</listitem>
<listitem>
<para>line* - the line where the node starts</para>
</listitem>
<listitem>
<para>column* - the column where the node starts</para>
</listitem>
<listitem>
<para>proprietary* - &true; if the node refers to a proprietary tag</para>
</listitem>
<listitem>
<para>id - the ID of the tag (one of the constants above, e.g. <constant>TIDY_TAG_FRAME</constant>)</para>
</listitem>
<listitem>
<para>attribute - an array with the attributes of the current node, or &null; if there aren't any</para>
</listitem>
<listitem>
<para>child - an array with the child <type>tidyNode</type>s, or &null; if there aren't any</para>
</listitem>
</itemizedlist>
<note>
<para>
The properties marked with * are just available since PHP 5.1.0.
</para>
</note>
</section>
</section>
</section>
&reference.tidy.constants;
<section id="tidy.examples">
&reftitle.examples;
<para>
This simple example shows basic Tidy usage.
<example>
<title>Basic Tidy usage</title>
<programlisting role="php">
<![CDATA[
<?php
ob_start();
?>
<html>a html document</html>
<?
$html = ob_get_clean();
// Specify configuration
$config = array(
'indent' => true,
'output-xhtml' => true,
'wrap' => 200);
// Tidy
$tidy = new tidy;
$tidy->parseString($html, $config, 'utf8');
$tidy->cleanRepair();
// Output
echo $tidy;
?>
]]>
</programlisting>
</example>
</para>
</section>
</partintro>
&reference.tidy.functions;
</reference>
<!-- 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
-->
|