In response to the suggestions of Thies and others, I went back through tidy and made a number of improvements to the API that I think should make most people happy and make tidy ready for B3. Notable changes are:
Multiple Document Processing $a = tidy_parse_file("http://www.php.net/"); tidy_clean_repair($a); echo tidy_get_output($a); Dual-Nature Object and object overloading: $a = tidy_parse_file("http://www.php.net/"); $a->clean_repair(); echo $a; echo $a->error_buf; /* or... */ $a = new tidy_doc(); $a->clean_repair(); /* Of course, you can also cross-use the syntax */ $a = new tidy_doc(); tidy_clean_repair($a); echo $a; A bit cleaner parsing ability: /* Get the Body node object */ $body = $a->body(); /* Get the 'BGCOLOR' attribute of the node */ echo $body->attribute['bgcolor']; /* echo everything from <body>....</body> */ echo $body; /* Check to see if there is any content of the body by looking for a child node. If there is, echo only the content of the body... */ if($body->has_children()) { echo $body->child[0]; /* Another node */ } You can also specify a default tidy configuration setup by setting tidy.default_config to a default configuration file, and automatically have tidy clean/repair the output by setting tidy.clean_output to true. I think with these changes tidy is ready to be packaged in B3, since no one really opposed it before can we get this done ASAP? If you'd like to play with tidy yourself, I have committed my work to HEAD in pecl/tidy John -- -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=- John Coggeshall http://www.coggeshall.org/ The PHP Developer's Handbook http://www.php-handbook.com/ -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php