title: Select node by its text value in xmlstarlet
body: <p>I am trying to extract the value of the 'Value' node, where the 'Key' node is 'state' within a bash shell:</p>
  
  <pre><code>&lt;FrontendStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" serializerVersion="1.1"&gt;
  &lt;script/&gt;
   &lt;State&gt;
    &lt;String&gt;
     ...
     ...
    &lt;/String&gt;
    &lt;String&gt;
     ...
     ...
    &lt;/String&gt;
    &lt;String&gt;
     &lt;Key&gt;state&lt;/Key&gt;
     &lt;Value&gt;WatchingLiveTV&lt;/Value&gt;
    &lt;/String&gt;
    &lt;String&gt;
     &lt;Key&gt;studiolevels&lt;/Key&gt;
     &lt;Value&gt;1&lt;/Value&gt;
    &lt;/String&gt;
    &lt;String&gt;
     ...
     ...
    &lt;/String&gt;
    &lt;String&gt;
     ...
     ...
    &lt;/String&gt;
   &lt;/State&gt;
  &lt;/FrontendStatus&gt;
  </code></pre>
  
  <p>I can extract the value if I reference the node directly:</p>
  
  <pre><code>$ xmlstarlet sel -t -m '/FrontendStatus[1]/State[1]/String[31]' -v Value &lt;status.xml
  WatchingLiveTV
  </code></pre>
  
  <p>But I would like to select it by the value of the 'Key' node instead</p>