PHP
  Home arrow PHP arrow Tracking Parsing Errors with the Tidy Library in PHP 5
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Tracking Parsing Errors with the Tidy Library in PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2007-07-11


    Table of Contents:
  • Tracking Parsing Errors with the Tidy Library in PHP 5
  • Summarizing some Tidy library concepts
  • Using the tidy_get_error_buffer() function
  • Using the tidy_access_count(), tidy_error_count() and tidy_warning_count() functions

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Tracking Parsing Errors with the Tidy Library in PHP 5
    ( Page 1 of 4 )

    Creating well-formed (X)HTML documents can be a hard-to-accomplish task, particularly for PHP developers who need to focus mainly on the data and business layers of their web applications, and not on their visual presentation modules. However, this issue can be addressed with minor hassles with the assistance of the excellent Tidy extension.

    Introduction

    Welcome to the last tutorial of the series "Working with the Tidy library in PHP 5." As you might have guessed, this series offers a friendly guide to using the most important functions that come bundled with the Tidy library, so you can start quickly incorporating them into your own PHP applications.

    Going straight to subject of this series, you'll remember that in the preceding article I showed you how to dissect and extract different parts of a given (X)HTML string (or even an (X)HTML file) for further processing. More concretely speaking, I demonstrated how to use the straightforward "tidy_get_html()," "tidy_get_head()" and "tidy_get_body()" functions, obviously included with the Tidy extension, in order to retrieve the entire content of a specific (X)HTML string, in addition to extracting its <head> and <body> sections respectively.

    While it must be admitted that retrieving the distinct parts of a concrete (X)HTML string might not be the most useful task for a seasoned PHP developer, it's valid to mention here that the Tidy library comes equipped with a remarkable set of functions for breaking up a web document in its main section, in this way allowing users to parse the different nodes of the document in question in a simpler way.

    All right, at this stage you've hopefully learned how to parse and fix the format of a given (X)HTML file via its specific set of Tidy functions, in addition to splitting a file into its most important pieces. So, the question that comes up is the following: what is the next step? Well, from a PHP developer's point of view, tracking all the errors that occurred when parsing a concrete (X)HTML string might be quite useful. Therefore, in this final tutorial of the series I'm going to cover some new functions bundled with the Tidy extension which are designed to show you the potential errors raised when interpreting (X)HTML data.

    Now, with the preliminaries out of our way, it's time to tackle this last article of the series and learn how to handle parsing errors with the Tidy extension. Let's move on!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT