From: Alex Young Date: 2007-11-30T07:18:15+09:00 Subject: Hpricot and XML Hi all, I've got a little XML parsing problem, and I'd like to use hpricot to use it. The following script: require 'rubygems' require 'hpricot' xml = <<-XML Child Account 4ba14634e8e52775af401ff8ae797316 BANK ISO4217 GBP 100 e83af2b8702f9bfbde73bd723216fe4f XML doc = Hpricot.XML(xml) puts doc.at("act:id").inner_html puts doc.at("act:name").inner_html puts doc.at("act:type").inner_html puts doc.at("act:parent").inner_html produces the following output: $ ruby test_hpricot.rb 4ba14634e8e52775af401ff8ae797316 Child Account BANK test_hpricot.rb:22: undefined method `inner_html' for nil:NilClass (NoMethodError) I *think* the exception is being caused by hpricot parsing the :parent as a pseudoclass. Any ideas as to how I could make that not happen, or otherwise make the last line of the script correctly display the guid in question? -- Alex