Possible Duplicate:
Best methods to parse HTML
i am trying to write php a script to parse html pages. I want to be able to parse the elements then traverse through them to check for a certain keyword appearing in that element. I have seen alot of libraries but am unable to get it. CAn someone point me to a tutorial or example which shows how to parse an html document then traverse through the elements. i do not want to creat a page just read a page.