I have a script which i am working on which retrieves certain information from many different urls, the information is always the same but the html elements are different a lot of the time.
Examples


<p class="bla bla">
<div id="bla bla"> this one i am using div[id=bla bla] so works ok
<span itemprop="Bla">
<p>bla bla bla</p> this is simple to call this i use p.
<span> this on ok also using span.
Then some time they can have nested elements like.
<p class="bla">
"Bla"
<span Itemprop-"bla" class-"bold-text">need this part</span>
</p>

So i guess i need to know what to use for :
<div class="bla bla bla">
<span itemprop="Bla">

and the nested one
<p class="bla">
"Bla"
<span Itemprop-"bla" class-"bold-text">need this part</span>
</p>

example line of current code :
$item['rating'] = $article->find('div[class=review-rating]', 0)->plaintext;