title: Linux Bash XMLLINT with XPATH
body: <p>Today I get to learn how to use xmllint properly.  It does not seem to be well covered or explained. I plan to use a single language resource file to run my entire system.  I have a mixture of bash scripts and php pages that must read from this language file.</p>
  
  <p>Currently I am using the following format in my xml file  en.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  
     &lt;item id="index.php"&gt;
          &lt;label&gt;LABEL&lt;/label&gt;
          &lt;value&gt;VALUE&lt;/value&gt;
          &lt;description&gt;DESCRIPTION&lt;/description&gt;
     &lt;/item&gt;
     &lt;item id="config.php"&gt;
          &lt;label&gt;LABEL&lt;/label&gt;
          &lt;value&gt;VALUE&lt;/value&gt;
          &lt;description&gt;DESCRIPTION&lt;/description&gt;
     &lt;/item&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>Now I need to start with a bash script line that should pull the data values from the xml file. For example I want to get the value of <code>DESCRIPTION</code> from the <code>index.php</code> item.</p>
  
  <p>I was using </p>
  
  <pre><code>xmllint --xpath 'string(//description)' /path/en.xml
  </code></pre>
  
  <p>for a different layout which worked, but now that I am changing the layout of my xml file, I am lost as to how best to target a specific <code>&lt;item&gt;</code> and then drill down to its child element in the bash script.</p>
  
  <p>Can someone help with a <code>xmllint --xpath</code> line to get this value please?</p>