From: Mark Thomas Date: 2008-08-13T04:07:33+09:00 Subject: Re: Hpricot and xpath Are you using an old version of Hpricot? When I run this code: #!/usr/bin/env ruby require 'rubygems' require 'hpricot' doc = Hpricot(open("tag.txt")) puts doc.at("#header").xpath I get the following result: //div[@id='header'] I'm using Hpricot 0.6 (do a gem list --local to see your version)