title: R: Parse XML in R
body: <p>I have a following XML file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1" standalone="no"?&gt;
  &lt;t:Forecast xmlns:t="http://example.com"&gt;
        &lt;Sender Abbreviation="abc" Name="xyz"/&gt;
        &lt;Recipient Abbreviation="efg" Name="cba"/&gt;
        &lt;createdUTC&gt;2017-11-24T10:41:11Z&lt;/createdUTC&gt;
        &lt;MessageID&gt;bcjs&lt;/MessageID&gt;
        &lt;SystemState&gt;test&lt;/SystemState&gt;
        &lt;ForecastData&gt;
            &lt;DataHeader GroupKey="rkolo"&gt;
  
            &lt;Timeseries ID="abc123"&gt;
                &lt;TimeInt ISTUTC="2017-11-24T10:45:00Z" Out="858"/&gt;
                &lt;TimeInt ISTUTC="2017-11-24T11:45:00Z" Out="868"/&gt;
            &lt;/Timeseries&gt;
  
            &lt;Timeseries ID="xyz"&gt;
                &lt;TimeInt ISTUTC="2017-11-24T10:45:00Z" Out="870"/&gt;
                &lt;TimeInt ISTUTC="2017-11-24T11:45:00Z" Out="890"/&gt;
            &lt;/Timeseries&gt;
        &lt;/ForecastData&gt;
  &lt;/t:Forecast&gt;
  </code></pre>
  
  <p>I would like to have two data frames</p>
  
  <pre><code>TimeInt                 out
  2017-11-24T10:45:00Z    858
  2017-11-24T11:45:00Z    868
  </code></pre>
  
  <p>and another data frame as </p>
  
  <pre><code>TimeInt                 out
  2017-11-24T10:45:00Z    870
  2017-11-24T11:45:00Z    890
  </code></pre>
  
  <p>So far, I have done as follows:</p>
  
  <pre><code>require(XML)
  
  temp = xmlParse("datafile.xml")
  data = xmlToList(temp)
  </code></pre>
  
  <p>But the output of <code>data</code> contains lot of nested lists. How do I get the data frames?  </p>
  
  <p><strong>Edit 1: changed <code>out</code> values</strong></p>