I have just started reading documentation and examples about DOM, in order to crawl and parse the document.
For example I have part of document shown below:
To create a parser you can use htmlDOM.
It is very simple easy to use DOM parser written in php. By using it you can easily fetch the contents of div tag.
div
For example, find all div tags which have attribute id with a value of text.
id
text
$ret = $html->find('div[id=text]');