Have a look at the following discussion:
There you will find a technique to scan a HTML for a set of particular type of HTML elements contained, and process them.
Have a look at the following discussion:
There you will find a technique to scan a HTML for a set of particular type of HTML elements contained, and process them.