title: pattern using xmllint command-line
body: <pre><code>]$ xmllint --version
  xmllint: using libxml version 20626
  </code></pre>
  
  <p>My xml file looks something like this:</p>
  
  <pre><code>&lt;projects&gt;
   &lt;architecture name="ARCH1"&gt;
    &lt;project label="StringA1" type="StringB1" state="StringC1"/&gt;
     ......
   &lt;/architecture&gt;
   &lt;architecture name="ARCH2"&gt;
    &lt;project label="StringA2" type="StringB2" state="StringC2"/&gt;
    ......
   &lt;/architecture&gt;
  &lt;/projects&gt;
  </code></pre>
  
  <p>For example, I would like to obtain the value <code>StringB2</code> given the condition <code>name==ARCH2</code> and <code>state==StringC2</code>. Is it possible using <code>xmllint</code> command line options, if yes, how ? Some examples will be beneficial. </p>
  
  <p>I can extract these using <code>sed</code> or <code>awk</code> but that may not be a good solution. </p>