title: Simplest way to do basic xml parsing from unix command line
body: <p>I'm searching for xml files that have certain properties. For example, files that contain the following pattern:</p>
  
  <pre><code>&lt;param-value&gt;
    &lt;name&gt;Hosts&lt;/name&gt;
    &lt;description&gt;some description&lt;/description&gt;
    &lt;value&gt;&lt;/value&gt;
  &lt;/param-value&gt;
  </code></pre>
  
  <p>For such files, I'd like to parse the value of another tag, such as:</p>
  
  <pre><code>&lt;param-value&gt;
    &lt;name&gt;Roles&lt;/name&gt;
    &lt;description&gt;some description&lt;/description&gt;
    &lt;value&gt;asdf&lt;/value&gt;
  &lt;/param-value&gt;
  </code></pre>
  
  <p>And print out the file name along with "asdf". What's the simplest way to accomplish this from the command line?</p>
  
  <p>One approach I was thinking of was just using grep with the -l option to filter the matching files out, and then using xargs grep to extract the value of Roles. However, grep doesn't work well with multi-line regexes. I saw another question that showed it could be done with the -Pzo options, but didn't have any luck getting it to work in my case. Is there a simpler approach?</p>