# Step 1: Dump the entire document while (my $tok = $p->get_token) { print Dumper($tok); }