From: Edward Middleton Date: 2009-12-21T16:45:40+09:00 Subject: Re: Nokogiri and xpath for changing value on the web Soichi Ishida wrote: > here is the code I tried. > ------------------------------------------------- > require 'rubygems' > require 'nokogiri' > require 'open-uri' > > url = "http://www.google.com/finance?q=INDEXNIKKEI:.N225" > > doc = Nokogiri::HTML(open(url).read) > > path1 = "/html/body/div[@id='ref_15513676_l']" > Your XPATH is wrong try path1 = "/html/body/div//span[@id='ref_15513676_l']" Edward