Using the tidy markup parser
In PHP 5 Tidy also provides a number of object-oriented constructs for
document parsing and screen-scraping.
Using the tidy parser is simple
A number of functions are provided to allow you to "jump into" a particular
major section of the document and begin traversing from there:
- • tidy_get_root() -- The root of the document tree
- • tidy_get_head() -- Starting from the < HEAD > node
- • tidy_get_html() -- Starting from the < HTML > node
- • tidy_get_body() -- Starting from the < BODY > node