On Dec 18, 2007 11:04 PM, Celine <xhanrot / gmail.com> wrote: > Hi all > > I'm trying to parse a page with Hpricot in order to retrieve a value. > > I use Xpather (a firefox extension) in order to get the path of this > value. But when I use this path with Hpricot, it doesn't work. I have > to change it so that it works. > > Here's my path, given by Xpather : > > /html/body/div[1]/div[2]/div[1]/div[2]/div[1]/div[2]/div[1]/div/div[1]/ > div[1]/table/tbody/tr[1] > HPricot doesn't include the whole XPath syntax. You can write a little function which translates XPath expressions with brackets to HPricot expressions. I wrote a function for that, but my SVN is right now down and I can't get it. Drop an answer if you still need it Firefox includes some missing HTML tags. I ran in it, when I had to write a little script. <tbody> is added in <table>, probably some more things, but I didn't find them. You can see the difference when you download the page with open-uri. Not many pages add <tbody>.