title: How to parse nested XML inside textfile using Spark RDD?
body: <p>I have an xml like:</p>
  
  <pre><code>1234^12^999^`&lt;row&gt;&lt;ab key="someKey" value="someValue"/&gt;&lt;ab key="someKey1" value="someValue1"/&gt;&lt;/row&gt;`^23232
  </code></pre>
  
  <p>We can parse normal xml file easily using scala XML support or even using databricks xml format, but how do I parse the xml embedded inside text.</p>
  
  <p>XML data alone can be extracted using:</p>
  
  <pre><code>val top5duration = data.map(line =&gt; line.split("^")).filter(line =&gt; {line(2)==100}).map(line =&gt; line(4))
  </code></pre>
  
  <p>But how do I proceed if i want to extract values for each 'key?</p>