From: Li Chen Date: 2008-08-13T03:53:27+09:00 Subject: Re: Hpricot and xpath Mark Thomas wrote: > Look carefully. It's not defined for nil. Which means that > doc.at("header") is returning nil. That's because there are no > elements with the name of "header"; only an attribute. Try using the > css selector "#header". Here is the result after I change to css selector or xpath; puts doc.at("#header").xpath() ag1.rb:4: undefined method `xpath' for {elem