title: extract xml tag and its value
body: <p>I want to read xml file and set its value into a variable.
  for example , </p>
  
  <p><strong>qhr2400.xml</strong></p>
  
  <pre><code>&lt;XML&gt;
  &lt;OPERATION type="1"&gt;
  &lt;TABLENAME&gt;TABLE&lt;/TABLENAME&gt;
  &lt;ROWSET&gt;
  &lt;ROW&gt;
  &lt;CLLI&gt;518&lt;/CLLI&gt;
  &lt;COLLECTION_DATE&gt;06/04/20 00:45:00&lt;/COLLECTION_DATE&gt;
  &lt;SS7RT&gt;99&lt;/SS7RT&gt;
  &lt;AQPRT_1&gt;84&lt;/AQPRT_1&gt;
  &lt;L7RMSUOCT_01&gt;80&lt;/L7RMSUOCT_01&gt;
  &lt;L7RMSUOCT_02&gt;80&lt;/L7RMSUOCT_02&gt;
  &lt;/ROW&gt;
  &lt;/ROWSET&gt;
  &lt;/OPERATION&gt;
  &lt;/XML&gt;
  </code></pre>
  
  <p>I want its value in a variable like $CLLI =518, $COLLECTION_DATE = 06/04/20 00:45:00, SS7RT = 99..
  so that I can use these values further to write an insert query.</p>
  
  <p>Basically I want to load this .xml data into a database table.</p>
  
  <p>this is what I tried.</p>
  
  <p><strong>read_xml.sh</strong></p>
  
  <pre><code>awk 'NF==1 &amp;&amp; (/ +&lt;[a-zA-Z]+&gt;/ || /^&lt;[a-zA-Z]+&gt;/ || / +&lt;\/[a-zA-Z]+&gt;/){ 
  next 
  } 
  { 
  sub(/^ +/,"") 
  gsub(/\"|&lt;|&gt;/,"",$0); 
  sub(/\/.*/,""); 
  if($0){ 
    print 
  } 
  } 
  ' qhr2400.xml
  </code></pre>
  
  <p><strong>Output</strong> </p>
  
  <pre><code>OPERATION type=1
  CLLI5018
  COLLECTION_DATE06
  SS7RT99
  AQPRT_184
  L7RMSUOCT_0180
  L7RMSUOCT_0280
  </code></pre>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks!</p>