title: xmllint usage in linux (shell script)
body: <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;DataTransfer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://cbi.marian.com/xmlschemas/jde_interface_v1.0.xsd"&gt;&lt;Summary&gt;
      &lt;PO&gt;
          &lt;PONumber&gt;1798128110160-1&lt;/PONumber&gt;
          &lt;PORevision&gt;6&lt;/PORevision&gt;
          &lt;POSystemID&gt;273906&lt;/POSystemID&gt;
          &lt;OrderDate&gt;19-02-2015&lt;/OrderDate&gt;
          &lt;RequiredDate&gt;15-10-2016&lt;/RequiredDate&gt;
          &lt;PromisedDeliveryDate&gt;27-03-2017&lt;/PromisedDeliveryDate&gt;
          &lt;RetentionPercentage&gt;&lt;/RetentionPercentage&gt;
          &lt;POReference1&gt;1798128110160-1&lt;/POReference1&gt;
          &lt;POReference2&gt;&lt;/POReference2&gt;
      &lt;/PO&gt;
      &lt;POItem&gt;
          &lt;LineNumber&gt;   1&lt;/LineNumber&gt;
          &lt;ItemDescription&gt;Enclosure containing &lt;/ItemDescription&gt;
          &lt;POReference1&gt;1798128110160-1&lt;/POReference1&gt;
          &lt;POReference2&gt;&lt;/POReference2&gt;
      &lt;/POItem&gt;
          &lt;POItem&gt;
          &lt;LineNumber&gt;  2&lt;/LineNumber&gt;
          &lt;ItemDescription&gt;Compressor&lt;/ItemDescription&gt;
          &lt;POReference1&gt;1798128110160-1&lt;/POReference1&gt;
          &lt;POReference2&gt;&lt;/POReference2&gt;
      &lt;/POItem&gt;
      &lt;POItem&gt;
          &lt;LineNumber&gt;  3&lt;/LineNumber&gt;
          &lt;ItemDescription&gt;Cooler&lt;/ItemDescription&gt;
          &lt;POReference1&gt;1798128110160-1&lt;/POReference1&gt;
          &lt;POReference2&gt;&lt;/POReference2&gt;
      &lt;/POItem&gt;
  </code></pre>
  
  <p>In the above xml I want to read only the 1st LineNumber under POItem. I am using the following command:</p>
  
  <pre><code>echo cat "//POItem/LineNumber/text()" | xmllint --shell po123.xml
  </code></pre>
  
  <p>This displays all 3 LineNumber values. Is it possible to fetch only the 1st LineNumber value without using the sed command. XML file name is po123.xml</p>
  
  <p>I don't have xpath in my current xmllint.</p>