stripping parens
Brought to you by:
bs_php,
nigelswinson
From: Peter J. <pe...@in...> - 2003-06-21 07:32:45
|
Hello all. Imagine I have an XHTML doc like so: <html> < ... > <body> <img src= ...> <table> <tr> <td><img src= .. > ... and I do a //img. This will give me all img elements in the doc. If I do //img[1] I still get the first element in all paths. If I do (//img)[1], I get all img elements, where I should just get the first element in the document. I looked at the source, and it seems like it strips off the brackets and ignores the predicate. Is that correct? Do you see support for this anytime soon? (I know I can just pull the first one off of the array I get back, but that's not xpath :-) Just curious. Thanks, Pete. -- Peter James pe...@ph... php|architect The Magazine for PHP Professionals http://www.phparch.com |