title: Read xml data in R and create data frame
body: <p>I'm trying to insert an xml data file into R and get a data frame. I'm using package 'XML' and <code>xmlToDataFrame("test.xml")</code> command. This is giving me the following error: <code>xmlParseCharRef: invalid xmlChar value 26</code>.</p>
  
  <p>Now, from my research online there's probably something going on in the xml file. I've tried replacing all escaping characters e.g. <code>&amp;</code> with <code>&amp;amp;</code> I even replaced <code>Ó</code> with <code>O</code> (although it shouldn't make a difference but just to be sure). It didn't work. The xml data file has over 2million rows so it is impossible to go through it line by line. </p>
  
  <p>Does anyone have any idea on what other character could be causing me the problem?</p>
  
  <p>I should also mentioned that the encoding on the file was <code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</code> but I've also tried <code>&lt;?xml version=''1.0'' encoding=''iso-8859-1''?&gt;</code> and <code>&lt;?xml version="1.0" encoding="ascii"?&gt;</code>. However, I have no idea what this means, but people were suggesting it online. Any help would be greatly appreciated!</p>
  
  <p>Example of xml data:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;data&gt;
  &lt;new_buildings&gt;
  &lt;new_building&gt;
  &lt;new_building_shipyard_name value="189 (189 COMPANY)"/&gt;
  &lt;new_building_bv_number value="29"/&gt;
  &lt;new_building_ship_type value="boat"/&gt;
  &lt;new_building_commercial_owner_name value="SHIPYARDS"/&gt;
  &lt;new_building_registered_owner_code value="18"/&gt;
  &lt;new_building_keel_laying_date value="2013-08-14"/&gt;
  &lt;new_building_confidentiality_indicator value="N"/&gt;
  &lt;/new_building&gt;
  &lt;new_building&gt;
  </code></pre>