Hi
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 :
<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 used the http://php.net/manual/en/domnode.getnodepath.php but thats only work with tag name and not working with a word or text searching in a string.
i want getting like this result finally :
/html/body/div/div/div/div[2]/div/p
how i can doing like that ?
and is it possible doint that with php simple_html_dom parser ?
Thanks.