title: Bash script: Get XML elements into array using xmllint
body: <p>This is a follow up question to  <a href="https://stackoverflow.com/questions/20489279/get-valid-url-from-string-using-bash-script/20490304">this post</a>. </p>
  
  <p>I want to end up with an array, containing all the <code>&lt;description&gt;</code> elements of the xml.</p>
  
  <pre><code>array[0] = "&lt;![CDATA[A title for .... &lt;br /&gt;]]&gt;"
  array[1] = "&lt;![CDATA[A title for .... &lt;br /&gt;]]&gt;"
  </code></pre>
  
  <p>...</p>
  
  <pre><code>file.xml:
  
  &lt;item&gt;
      &lt;description&gt;&lt;![CDATA[A title for the URLs&lt;br /&gt;&lt;br /&gt;
  
      http://www.foobar.com/foo/bar
      &lt;br /&gt;http://bar.com/foo
      &lt;br /&gt;http://myurl.com/foo
      &lt;br /&gt;http://desiredURL.com/files/ddd
      &lt;br /&gt;http://asdasd.com/onefile/g.html
      &lt;br /&gt;http://second.com/link
      &lt;br /&gt;]]&gt;&lt;/description&gt; 
  
  
  &lt;/item&gt;
      &lt;/item&gt;
  &lt;description&gt; ...&lt;/description&gt;
      &lt;item&gt;
  </code></pre>