From: "Luis G." Date: 2011-02-28T19:50:17+09:00 Subject: Re: Nokogiri not pulling correct XPath Hello... I've been using Nokogiri for a while and I never had problems with it. It works great. I have some questions for you... Why do you put the full path to the h2 tag? The h2 has a class or an id defined? how about all the div in between, they have class or id defined? I'm asking that because you can access inner_html of an html tag like this: doc.xpath("//div[@class='(class of the div here)']/h2").each do |node| var = node.inner.html end You don't really need to put the full path to the html tag. You can also use //div[@id='(id of the div here), for example. Probably the other variables are not working because you missed a div or something else in between... I think the way I show in lines above is easy to get the html content without making mistakes. If you want just let me know the url you want to get the content and I'll build a small script to do that. Regards, Luis Goncalves -- Posted via http://www.ruby-forum.com/.