Vita Rara: A Life Uncommon

Hpricot

  • user warning: Got error 28 from storage engine query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN (1) in /home/vrorg/website/html/cms/includes/database.mysql.inc on line 120.
  • user warning: Got error 28 from storage engine query: SELECT t.tid, t.* FROM term_data t INNER JOIN term_hierarchy h ON h.parent = t.tid WHERE h.tid = 100 ORDER BY weight, name in /home/vrorg/website/html/cms/includes/database.mysql.inc on line 120.
  • user warning: Got error 28 from storage engine query: SELECT t.* FROM term_node r INNER JOIN term_data t ON r.tid = t.tid INNER JOIN vocabulary v ON t.vid = v.vid WHERE r.nid = 174 ORDER BY v.weight, t.weight, t.name in /home/vrorg/website/html/cms/includes/database.mysql.inc on line 120.

Hpricot to Nokogiri Day 1


Nokogiri's #xpath != Hpricot's #xpath

In Hpricot you can call xpath on a node to get the XPath that will retrieve that node from the document. In Nokogiri that equivalent is path.

I ran into this trying to figure out the xpath to a node in an HTML document. My normal routine is to load up the document in IRB and poke around to find the things I need.

Syndicate content