title: Get Node value from a XML using xmllint
body: <p>I have a xml called Det.xml like this :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt;
          &lt;S:Body&gt;
              &lt;ns4:grtHgetRed xmlns:ns2="http://object" xmlns:ns3="http://object" xmlns:ns4="http://object"&gt;
                  &lt;RequestId&gt;lol&lt;/RequestId&gt;
                  &lt;MessageDateTime&gt;54.009&lt;/MessageDateTime&gt;
                  &lt;SenderId&gt;UH&lt;/SenderId&gt;
                  &lt;ReceiverId&gt;GER&lt;/ReceiverId&gt;
                  &lt;TrackingNumber&gt;45&lt;/TrackingNumber&gt;
                  &lt;ServerName&gt;trewds&lt;/ServerName&gt;
                  &lt;ResponseType&gt;success&lt;/ResponseType&gt;
                  &lt;StatusInfo&gt;
                  &lt;Status&gt;success&lt;/Status&gt;
                  &lt;SystemMessage&gt;Hagert&lt;/SystemMessage&gt;
                  &lt;UserMessage&gt;Hgert&lt;/UserMessage&gt;
                  &lt;Origination&gt;htref&lt;/Origination&gt;
                  &lt;/StatusInfo&gt;
              &lt;/ns4:grtHgetRed&gt;
          &lt;/S:Body&gt;
      &lt;/S:Envelope&gt;
  </code></pre>
  
  <p>I am trying to get the <code>ResponseType</code> node value <code>success</code> from it using <code>xmllint</code> in Unix shell script and so i tried the following :</p>
  
  <pre><code>echo "cat //*[local-name()='S:Envelope'/*[local-name()='S:Body']/*[local-name()='ns4:grtHgetRed']/*[local-name()='ResponseType']" | xmllint --shell Det
  .xml | sed '/^\/ &gt;/d' | sed 's/&lt;[^&gt;]*.//g'
  </code></pre>
  
  <p>But it's not working . Also i don't  have <code>xpath</code> in my unix environment . Can any one tell me what am i doing wrong here ?</p>