title: How to check for multiple attributes in XPath?
body: <p>I'd like to select stylesheets in an XHTML document, which contain not only description, but also href.</p>
  
  <p>For example</p>
  
  <pre><code>&lt;link rel="stylesheet" href="123"/&gt; 
  </code></pre>
  
  <p>should be selected, and </p>
  
  <pre><code>&lt;link rel="stylesheet"/&gt;  
  </code></pre>
  
  <p>should not.</p>
  
  <p>At present, I'm doing it like this:</p>
  
  <pre><code>foreach (XmlNode n in xml.SelectNodes(@"//link[@rel='stylesheet']"))
  {
      if (n.Attributes["href"]==null||n.Attributes[""].Value==null)
      {
          continue;
      }
      var l = Web.RelativeUrlToAbsoluteUrl(stuffLocation, n.Attributes["href"].Value);
  }
  </code></pre>
  
  <p>but I suspect there's a much better way of doing this. Is there?</p>