Wait! There's More!
As powerful as tidy already is, the PHP tidy extension also
makes parsing and navigating an HTML document tree a snap!
Accessing Document Nodes
Tidy allows you to "jump into" a document tree at key
points and from there navigate your way using object constructs
Just call one of these four methods to get started..
- • root() -- Begin at the start of the document
- • head() -- Begin at the <HEAD> tag
- • html() -- Begin at the <HTML> tag
- • body() -- Begin at the <BODY> tag