title: Can't unlist a XML file after parsing
body: <p>I'm trying to get data from the open-database of fuel price in France. The data are available <a href="https://donnees.roulez-eco.fr/opendata/annee" rel="nofollow noreferrer">here</a> and are in a <strong>xml</strong> format. The variable types (nodes or attribute) can be found <a href="https://www.prix-carburants.gouv.fr/rubrique/opendata/" rel="nofollow noreferrer">here</a> (part 4), or below as a picture.</p>
  <p>My issue is, as I parse the data and then convert them as a list, the nodes are no longer considered as such, and so the data become unreadable. Here's the code I used (found <a href="https://stackoverflow.com/questions/17198658/how-to-parse-xml-to-r-data-frame">here</a>):</p>
  <pre><code>library(XML)
  temp &lt;- XML::xmlParse(&quot;Z:/temp/PrixCarburants_annuel_2021.xml&quot;)
  temp2 &lt;- XML::xmlToList(temp)
  </code></pre>
  <p>Does anyone know a solution in order to get the data in a corret shape? I know there's a way in <code>XML</code> package to specify the nodes, but I could not find a way to do so. And if I could retrieve the data as a datatable or a dataframe instead of a list, that would be ideal.</p>
  <p>Thanks a lot!</p>
  <p><a href="https://i.stack.imgur.com/QdhNw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QdhNw.png" alt="Attributes" /></a></p>