CIV. tidy Functions

Introduction

Tidy is a binding for the Tidy HTML clean and repair utility which allows you to not only clean and otherwise manipluate HTML documents, but also traverse the document tree.

Requirements

Tidy is currently available for PHP 4.3.x and PHP 5 as a PECL extension. To use Tidy, you will need libtidy installed,available on the tidy homepage http://tidy.sourceforge.net/.

Installation

The tidy extension is available from PECL http://pecl.php.net/package/tidy

Table of Contents
tidy_access_count --  Returns the Number of Tidy accessibility warnings encountered for specified document.
tidy_clean_repair --  Execute configured cleanup and repair operations on parsed markup
tidy_config_count --  Returns the Number of Tidy configuration errors encountered for specified document.
tidy_diagnose --  Run configured diagnostics on parsed and repaired markup.
tidy_error_count --  Returns the Number of Tidy errors encountered for specified document.
tidy_get_body --  Returns a TidyNode Object starting from the >BODY< tag of the tidy parse tree
tidy_get_config --  Get current Tidy configuarion
tidy_get_error_buffer --  Return warnings and errors which occured parsing the specified document
tidy_get_head --  Returns a TidyNode Object starting from the >HEAD< tag of the tidy parse tree
tidy_get_html_ver --  Get the Detected HTML version for the specified document.
tidy_get_html --  Returns a TidyNode Object starting from the >HTML< tag of the tidy parse tree
tidy_get_output --  Return a string representing the parsed tidy markup
tidy_get_release --  Get release date (version) for Tidy library
tidy_get_root --  Returns a TidyNode Object representing the root of the tidy parse tree
tidy_get_status --  Get status of specfied document.
tidy_getopt --  Returns the value of the specified configuration option for the tidy document.
tidy_is_xhtml --  Indicates if the document is a generic (non HTML/XHTML) XML document.
tidy_load_config --  Load an ASCII Tidy configuration file with the specified encoding
tidy_node::attributes --  Returns an array of attribute objects for node
tidy_node::children --  Returns an array of child nodes
tidy_node::get_attr --  Return the attribute with the provided attribute id
tidy_node::get_nodes --  Return an array of nodes under this node with the specified id
tidy_node::has_children --  Returns true if this node has children
tidy_node::has_siblings --  Returns true if this node has siblings
tidy_node::is_asp --  Returns true if this node is ASP
tidy_node::is_comment --  Returns true if this node represents a comment
tidy_node::is_html --  Returns true if this node is part of a HTML document
tidy_node::is_jsp --  Returns true if this node is JSP
tidy_node::is_jste --  Returns true if this node is JSTE
tidy_node::is_text --  Returns true if this node represents text (no markup)
tidy_node::is_xhtml --  Returns true if this node is part of a XHTML document
tidy_node::is_xml --  Returns true if this node is part of a XML document
tidy_node::next --  Returns the next sibling to this node
tidy_node::prev --  Returns the previous sibiling to this node
tidy_node::tidy_node --  Constructor.
tidy_parse_file --  Parse markup in file or URI
tidy_parse_string --  Parse a document stored in a string
tidy_repair_file --  Repair a file using an optionally provided configuration file
tidy_repair_string --  Repair a string using an optionally provided configuration file
tidy_reset_config --  Restore Tidy configuration to default values
tidy_save_config --  Save current settings to named file. Only non-default values are written.
tidy_set_encoding --  Set the input/output character encoding for parsing markup. Values include: ascii, latin1, raw, utf8, iso2022, mac, win1252, utf16le, utf16be, utf16, big5 and shiftjis.
tidy_setopt --  Updates the configuration settings for the specified tidy document.
tidy_warning_count --  Returns the Number of Tidy warnings encountered for specified document.