i want know how i can getting a xpath address
of a string in html code. for example i want finding xpath of YES in this html code :
Code: Select all
<div><div>
<div><div>
<div>
<p>NO</p>
<div>
<p>a text</p>
</div>
</div>
</div>
<div>
<div>
<p>YES</p>
<div>
<p>b text</p>
</div>
</div>
</div></div>
</div></div>i want getting like this result finally :
Code: Select all
/html/body/div/div/div/div[2]/div/pand is it possible doint that with php simple_html_dom parser ?
Thanks.