title: How to use xmlns declarations with XPath in Nokogiri
body: <p>I'm using Nokogiri::XML to parse responses from Amazon SimpleDB. The response is something like:</p>
  
  <pre><code>&lt;SelectResponse xmlns="http://sdb.amazonaws.com/doc/2007-11-07/"&gt;
    &lt;SelectResult&gt;
      &lt;Item&gt;
        &lt;Attribute&gt;&lt;Name&gt;Foo&lt;/Name&gt;&lt;Value&gt;42&lt;/Value&gt;&lt;/Attribute&gt;
        &lt;Attribute&gt;&lt;Name&gt;Bar&lt;/Name&gt;&lt;Value&gt;XYZ&lt;/Value&gt;&lt;/Attribute&gt;
      &lt;/Item&gt;
    &lt;/SelectResult&gt;
  &lt;/SelectResponse&gt;
  </code></pre>
  
  <p>If I just hand the response straight over to Nokogiri, all XPath queries (e.g. <code>doc/"//Item/Attribute[Name='Foo']/Value"</code>) return an empty array. But if I remove the <code>xmlns</code> attribute from the <code>SelectResponse</code> tag, it works perfectly.</p>
  
  <p>Is there some extra thing I need to do to account for the namespace declaration? This workaround feels horribly like a hack.</p>