this the part of the html i want to parse:
<center>
<table border="0" cellpadding="0" cellspacing="0" >
<td>
Some text
<br>
<font color=brown>label0</font>Value0
<br>
<font color=brown>Label1</font>Value1.<br>
Some text
<br>
<font color=brown>Label2</font>Value2<br>
</td>
</table>
</center>
I want to get Value0 and Value1.
If i use this:
$index=$element->nodeValue;
where element is the query to the .../font I get the Label0,1,2. But I want the Value. How to do it? I can also give more code if it is necessary.
Try perhaps:
$index=$element->nextSibling->nodeValue;
To get the value of the node after the font node.
<center>
<table border="0" cellpadding="0" cellspacing="0" >
<td>
Some text
<br>
<font color=brown>label0</font><span>Value0</span>
<br>
<font color=brown>Label1</font><span>Value1.</span><br>
Some text
<br>
<font color=brown>Label2</font>Value2<br>
</td>
</table>
</center>
try putting span just as above and instead of quering font query for span... hope it will help..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With