Re: [PHP] xpath help
On 5/9/10, Peter Lind wrote: > On 9 May 2010 10:31, Gary wrote: >> If I have a document containing, say: >> ... >> >> 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) I found out what my problem was. Something, somewhere - the plugin, Firefox itself, something - decided to "help me" by inserting TBODY elements into the xpath which just plain did not exist in the original HTML. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xpath help
On 9 May 2010 10:31, Gary wrote: > If I have a document containing, say: > > > > > > foo1 > bar1 > > > > foo2 > > > bar2 > > > ... > > 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 -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xpath help
If I have a document containing, say: foo1 bar1 foo2 bar2 ... How do I get at "bar2"? I tried everything, based on an xpath from Firebug (Firefox plugin), but kept getting NULL. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php