Re: [hpricot] issues using preceding-sibling/following-sibling in xpath queries
- From:
- Bryant Fong
- Date:
- 2010-06-03 @ 18:58
Hmm, thats what I was afraid of. Strange. Do you know what underlying
xpath library hpricot uses? Anyways, big thanks for getting back to me -- I
know I can go direct, but it means I have to write more code instead of
using existing wrapper libraries. Oh well..
On Thu, Jun 3, 2010 at 5:32 AM, i5m <i5ivem@gmail.com> wrote:
> One option would be looking to see if you can do what you want with
> Mechanize directly. E.g:
>
>
>
http://stackoverflow.com/questions/1298080/transitioning-from-scrubyt-to-nokogiri-write-to-xml-or-hash
>
>
>
<http://stackoverflow.com/questions/1298080/transitioning-from-scrubyt-to-nokogiri-write-to-xml-or-hash>
> -----------------------
> i5m.co.uk
> GPG Key: 0xA18A602B
>
>
> On Thu, Jun 3, 2010 at 1:27 PM, i5m <i5ivem@gmail.com> wrote:
>
>> Bryant,
>>
>> I think it's going to be bad news. Just had a quick check with Hpricot
>> 0.8.2 on Windows, but with Ruby 1.8.7, 1.9.1 and JRuby 1.5.
>>
>> ...
>> Tried with a few other "supported axes", couldn't get any to work. I
>> don't think this xpath functionality is in Hpricot, or if it is, it's
>> broken.
>>
>>
>>
>>
>> On Wed, Jun 2, 2010 at 10:02 PM, Bryant Fong <bryantf@gmail.com> wrote:
>>
>>> I'm having trouble getting sibling-based xpath queries to work with
>>> search(), which seem to work fine in an xpath validator.
>>>
>>>
>>
>>
>
Re: [hpricot] issues using preceding-sibling/following-sibling in xpath queries
- From:
- i5m
- Date:
- 2010-06-04 @ 10:34
Well the readme says " The XPath and CSS parser, in fact, is based on John
Resig's JQuery." So basically it's using it's own custom xpath library.
Whereas Nokogiri uses libxml2.
-----------------------
i5m.co.uk
GPG Key: 0xA18A602B
On Thu, Jun 3, 2010 at 7:58 PM, Bryant Fong <bryantf@gmail.com> wrote:
> Hmm, thats what I was afraid of. Strange. Do you know what underlying
> xpath library hpricot uses? Anyways, big thanks for getting back to me -- I
> know I can go direct, but it means I have to write more code instead of
> using existing wrapper libraries. Oh well..
>
>
Re: [hpricot] issues using preceding-sibling/following-sibling in xpath queries
- From:
- Bryant Fong
- Date:
- 2010-06-04 @ 21:37
Just to complete this thread, it works as expected in Nokogiri.
It is listed as supported in the hpricot wiki (
http://wiki.github.com/hpricot/hpricot/supported-xpath-expressions), but it
could be because I'm using hpricot 0.8.5. I think they're at 1.0 now, which
isn't compatible with scrubyt. So, I'll probably be switching over to
Nokogiri instead which appears to be more active. Thanks for your help once
again.
On Fri, Jun 4, 2010 at 3:34 AM, i5m <i5ivem@gmail.com> wrote:
> Well the readme says " The XPath and CSS parser, in fact, is based on John
> Resig's JQuery." So basically it's using it's own custom xpath library.
> Whereas Nokogiri uses libxml2.
>
>
> -----------------------
> i5m.co.uk
> GPG Key: 0xA18A602B
>
>
> On Thu, Jun 3, 2010 at 7:58 PM, Bryant Fong <bryantf@gmail.com> wrote:
>
>> Hmm, thats what I was afraid of. Strange. Do you know what underlying
>> xpath library hpricot uses? Anyways, big thanks for getting back to me -- I
>> know I can go direct, but it means I have to write more code instead of
>> using existing wrapper libraries. Oh well..
>>
>>
>