title: Load XML to DataFrame in R
body: <p>I am new to R programming and trying to load a simple XML. I tried </p>
  
  <pre><code>data &lt;- xmlToDataFrame("temp.xml")
  </code></pre>
  
  <p>but got this error </p>
  
  <blockquote>
    <p>Error in xmlToDataFrame(xmlParse(doc), colClasses, homogeneous, collectNames,  : 
      error in evaluating the argument 'doc' in selecting a method for function 'xmlToDataFrame': Error: XML content does not seem to be XML: 'temp.xml'`</p>
  </blockquote>
  
  <p><strong>XML Schema</strong></p>
  
  <pre><code>&lt;root&gt;
    &lt;row Id="1" UserId="1" Name="Rohit" Date="2009-06-29T10:28:58.013" /&gt;
    &lt;row Id="2" UserId="3" Name="Rohit" Date="2009-06-29T10:28:58.030" /&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Also I tried:</p>
  
  <pre><code>xml &lt;- xmlParse("temp.xml")
  </code></pre>
  
  <p>Output:</p>
  
  <blockquote>
    <p>Error: XML content does not seem to be XML: 'temp.xml'</p>
  </blockquote>
  
  <p>My XML file is in same working directory.</p>
  
  <p>Also if you want to try, I have uploaded the sample XML here: <a href="http://www4.ncsu.edu/~rkandha/temp.xml" rel="nofollow">http://www4.ncsu.edu/~rkandha/temp.xml</a><br>
  Please provide some direction on which function I should use here.</p>