another xpath problem
Posted: Thu Dec 15, 2011 1:41 pm
Hi everyone,
I am having trouble getting a specific <li> node using xpath . I want to get the value of the node whose text value cpntains or begins with " temp1: "
The HTML looks like this:
[text]
ul class="temperatures">
<li> temp1: string1 </li>
<li> temp2: string2 </li>
</ul>
[/text]
So far I have:
This is not working.
Thank you in advance,
KC
I am having trouble getting a specific <li> node using xpath . I want to get the value of the node whose text value cpntains or begins with " temp1: "
The HTML looks like this:
[text]
ul class="temperatures">
<li> temp1: string1 </li>
<li> temp2: string2 </li>
</ul>
[/text]
So far I have:
Code: Select all
$temp1= $simplexml->xpath("//li[contains(text(), 'temp1:')]";
Thank you in advance,
KC