From: Chris Shea Date: 2007-12-19T07:21:22+09:00 Subject: Re: Hpricot syntax different from Xpath ? On Dec 18, 2007 3:04 PM, Celine 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] > > > And here's what I have to write in order to make it understand by > Hpricot : > > /html/body/div/div/div/div/div/div/div/div/div/div/table/tr > > > Could you explain me why I have to write that ? Well, it depends. It'd be helpful to see the page you're working with. You might want to try asking the Hpricot mailing list as well (To join: Send a message to hpricot@code.whytheluckystiff.net Cc: why@whytheluckystiff.net). Chris