From: Celine Date: 2007-12-19T07:39:58+09:00 Subject: Re: Hpricot syntax different from Xpath ? On Dec 18, 11:25 pm, Thomas Wieczorek wrote: > On Dec 18, 2007 11: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] > > 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. is added in , 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 . Hi Thomas I'm very interested in your function. Do you know where I can find differences between XPath syntax and Hpricot syntax ? What reference did you use to write your function ? Celine