# Evaluating XPaths with indices in HPricot

**URL:** <https://www.ruby-forum.com/t/evaluating-xpaths-with-indices-in-hpricot/71351>\
**Category:** Ruby\
**Created:** [October 7, 2006, 3:00pm UTC](https://www.ruby-forum.com/t/evaluating-xpaths-with-indices-in-hpricot/71351 "2006-10-07T15:00:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![splattael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@splattael](https://www.ruby-forum.com/u/splattael)\
**Post date:** [October 7, 2006, 3:00pm UTC](https://www.ruby-forum.com/t/evaluating-xpaths-with-indices-in-hpricot/71351/1 "2006-10-07T15:00:10Z")

</div>

Hello,

I have been asking this a few days ago, and since I got no response and  
I needed it badly I came up with a hack:

[http://www.rubyrailways.com/evaluating-xpaths-with-indicdes-in-hpricot/](http://www.rubyrailways.com/evaluating-xpaths-with-indicdes-in-hpricot/)

I am not really sure it is the nicest way to solve this, but it works  
😉 Maybe it can be useful for somebody else, too.

Best,  
Peter  
[http://www.rubyrailways.com](http://www.rubyrailways.com)
