title: Parsing XML in R data stored in attributes with blanks
body: <p>I am trying to parse the data contained in an XML file using R. I would like the data to be read into a dataframe. The data is located at the following URL:</p>
  
  <p><a href="http://www.usda.gov/oce/commodity/wasde/report_format/latest-July-2015-New-Format.xml" rel="nofollow noreferrer">http://www.usda.gov/oce/commodity/wasde/report_format/latest-July-2015-New-Format.xml</a></p>
  
  <p>I have reviewed some similar posts on stackoverflow such as <a href="https://stackoverflow.com/questions/26821284/how-to-convert-xml-data-to-data-frame-in-r">How to convert xml data to data frame in R</a> but I still cannot seem to get them to work. One issue I ran into is that some of the values are empty and then appear like this:</p>
  
  <pre><code>&lt;Cell Textbox73="filler" /&gt; 
  </code></pre>
  
  <p>The general key value pair is structured as follows:</p>
  
  <pre><code>&lt;m1_attribute_group&gt;
     &lt;s3 attribute1="Trade 2/"&gt;
         &lt;s4&gt;
             &lt;Cell cell_value1="372.02"/&gt;
         &lt;/s4&gt;
     &lt;/s3&gt;
  &lt;/m1_attribute_group&gt;
  </code></pre>
  
  <p>Is there any way to parse this file quickly with xmlToDataFrame() or xmlAttrsToDataFrame() or do I have to build custom functions to apply over the list of nodes?</p>