Please read tutorial I've gave you and copy code exactly as I gave you.
In my code there is at_xpath("//h1") in yours xpath("//h1"). at_xpath
returns first item matching criteria, while xpath returns array of
elements. So this error tells you that there is no content method for Array
class.

2012/9/10 Sybren Kooistra <[email protected]>

> 035 > Dir.glob('*.html').each do |document|
> 036 > f = File.open(document)
> 037?> searchablefile = Nokogiri::HTML(f)
> 038?> variabelekoloma = searchablefile.xpath("//h1")
> 039?> shee1[row, 0] = variabelekoloma.content
> 040?> row += 1
> 041?> end
> NoMethodError: undefined method 'content' for
> #Nokogiri::XML::NodeSet:0xa501bbc>
> from (irb):39: in 'block in irb_binding'
> from (irb):35: in 'each'
> from (irb):35
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to