My Photos

www.flickr.com
This is a Flickr badge showing public photos and videos from coogle. Make your own badge here.

Quicksearch

Tidy in PHP 5

Thursday, December 18. 2003

I am happy to announce that tidy 2.0 will be available in PHP 5 starting with the upcoming Beta 3 release of PHP. Tidy 2.0 is a major step forward, allowing developers to parse multiple documents at once, have their output automatically validated and repaired through output buffering, and offers a much more robust syntax then previous versions. Although I haven't had time to document tidy 2.0 yet, it's basic functionality has not changed from 1.0. The single biggest difference is the introduction of object resources that allow you to handle multiple documents at once:


$a = tidy_parse_file("http://www.coggeshall.org/");
tidy_clean_repair($a);
echo tidy_get_error_buffer($a);
echo tidy_get_output($a);


Along side these improvements is a object-based interface for tidy:


$a = new tidy();
$a->parse_file("http://www.coggeshall.org/");
$a->clean_repair();

echo $a->error_buf;
echo $a;


If desired, the syntax can also be mixed (although not recommended):


$a = tidy_parse_file("http://www.coggeshall.org/");
$a->clean_repair();

echo tidy_get_error_buffer($a);
echo $a;


For those of you who can't wait for Beta 3 to be released, tidy 2.0 can also be found in it's usual home in the PECL repository.

Bookmark Tidy in PHP 5  at del.icio.us Digg Tidy in PHP 5 Bloglines Tidy in PHP 5 Technorati Tidy in PHP 5 Fark this: Tidy in PHP 5 Bookmark Tidy in PHP 5  at YahooMyWeb Bookmark Tidy in PHP 5  at Furl.net Bookmark Tidy in PHP 5  at reddit.com Bookmark Tidy in PHP 5  at blinklist.com Bookmark Tidy in PHP 5  at Spurl.net Bookmark Tidy in PHP 5  at NewsVine Bookmark Tidy in PHP 5  at Simpy.com Bookmark Tidy in PHP 5  at blogmarks Bookmark Tidy in PHP 5  with wists Bookmark Tidy in PHP 5  at Ma.gnolia.com wong it! Bookmark using any bookmark manager!

Trackbacks

No Trackbacks

Comments
Display comments as (Linear | Threaded)

No comments

The author does not allow comments to this entry