L
Li Chen
Hi all,
I use hpricot to load a page. Then I try to find the path for an
element "font"(<font face="courier" color="black">) in the page. Here is
the tutorial
(http://code.whytheluckystiff.net/hpricot/wiki/HpricotBasics):
doc.at("#header").xpath
#=> "//div[@id='header']"
here is my code:
puts doc.at("#font").xpath
When I run the code Ruby complains undefined method for xpath. I wonder
if I have problem understanding the tutorial.
Thanks,
Li
I use hpricot to load a page. Then I try to find the path for an
element "font"(<font face="courier" color="black">) in the page. Here is
the tutorial
(http://code.whytheluckystiff.net/hpricot/wiki/HpricotBasics):
doc.at("#header").xpath
#=> "//div[@id='header']"
here is my code:
puts doc.at("#font").xpath
When I run the code Ruby complains undefined method for xpath. I wonder
if I have problem understanding the tutorial.
Thanks,
Li