Re: xpath help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 May 2010 10:31, Gary <php-general@xxxxxxxxxxxxxxx> wrote:
> If I have a document containing, say:
> <html>
>  <body>
>  <table>
>   <tbody>
>    <tr>
>     <td><font ...>foo1</font></td>
>     <td><font ...>bar1</font></td>
>    </tr>
>    <tr>
>     <td>
>      <font ...>foo2</font>
>     </td>
>     <td>
>      <font ...>bar2</font>
>     </td>
>    </tr>
> ...
>
> How do I get at "bar2"? I tried everything, based on an xpath from
> Firebug (Firefox plugin), but kept getting NULL.
>

try //table//font - that should give you all the font elements in
table elements. Given your layout, you're then looking for
$list->item(3)

Regards
Peter


-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux