views:

44

answers:

1

Supposing I want to query for the XPath //*[@id=$href]. How can I tell nokogiri to safely bind a value for the $href variable?

This is similar to REXML's XPath.first( node, "//*[@id=$href]", nil, {"href"=>"linktohere"})

A: 

This feature has just (a half hour ago) been added to Nokogiri, so it should appear in the next version.

Ken Bloom