title: Cannot run xmlParse()
body: <p>I am trying to read an <code>xml</code> file using the function <code>xmlParse()</code> on <code>rstudio</code>. I have installed and loaded (globally) all the packages required for this, namely <code>XML</code> and <code>methods</code>. Here is my code:</p>
  
  <pre><code>setwd("~/Desktop/R ")
  xmlParse(file = "input.xml")
  </code></pre>
  
  <p>I set the directory where the file <code>input.xml</code> is located. The information in the file looks like this:</p>
  
  <pre><code>&lt;RECORDS&gt;
    &lt;EMPLOYEE&gt;
      &lt;ID&gt;1&lt;/ID&gt;
      &lt;NAME&gt;Rick&lt;/NAME&gt;
      &lt;SALARY&gt;623.3&lt;/SALARY&gt;
      &lt;STARTDATE&gt;1/1/2012&lt;/STARTDATE&gt;
      &lt;DEPT&gt;IT&lt;/DEPT&gt;
    &lt;/EMPLOYEE&gt;
    &lt;EMPLOYEE&gt;
      &lt;ID&gt;2&lt;/ID&gt;
      &lt;NAME&gt;Dan&lt;/NAME&gt;
      &lt;SALARY&gt;515.2&lt;/SALARY&gt;
      &lt;STARTDATE&gt;9/23/2013&lt;/STARTDATE&gt;
      &lt;DEPT&gt;Operations&lt;/DEPT&gt;
    &lt;/EMPLOYEE&gt;
    &lt;EMPLOYEE&gt;
      &lt;ID&gt;3&lt;/ID&gt;
      &lt;NAME&gt;Michelle&lt;/NAME&gt;
      &lt;SALARY&gt;611&lt;/SALARY&gt;
      &lt;STARTDATE&gt;11/15/2014&lt;/STARTDATE&gt;
      &lt;DEPT&gt;IT&lt;/DEPT&gt;
    &lt;/EMPLOYEE&gt;
    &lt;EMPLOYEE&gt;
      &lt;ID&gt;4&lt;/ID&gt;
      &lt;NAME&gt;Ryan&lt;/NAME&gt;
      &lt;SALARY&gt;729&lt;/SALARY&gt;
      &lt;STARTDATE&gt;5/11/2014&lt;/STARTDATE&gt;
      &lt;DEPT&gt;HR&lt;/DEPT&gt;
    &lt;/EMPLOYEE&gt;
    &lt;EMPLOYEE&gt;
      &lt;ID&gt;5&lt;/ID&gt;
      &lt;NAME&gt;Gary&lt;/NAME&gt;
      &lt;SALARY&gt;843.25&lt;/SALARY&gt;
      &lt;STARTDATE&gt;3/27/2015&lt;/STARTDATE&gt;
      &lt;DEPT&gt;Finance&lt;/DEPT&gt;
    &lt;/EMPLOYEE&gt;
    &lt;EMPLOYEE&gt;
      &lt;ID&gt;6&lt;/ID&gt;
      &lt;NAME&gt;Nina&lt;/NAME&gt;
      &lt;SALARY&gt;578&lt;/SALARY&gt;
      &lt;STARTDATE&gt;5/21/2013&lt;/STARTDATE&gt;
      &lt;DEPT&gt;IT&lt;/DEPT&gt;
    &lt;/EMPLOYEE&gt;
    &lt;EMPLOYEE&gt;
      &lt;ID&gt;7&lt;/ID&gt;
      &lt;NAME&gt;Simon&lt;/NAME&gt;
      &lt;SALARY&gt;632.8&lt;/SALARY&gt;
      &lt;STARTDATE&gt;7/30/2013&lt;/STARTDATE&gt;
      &lt;DEPT&gt;Operations&lt;/DEPT&gt;
    &lt;/EMPLOYEE&gt;
    &lt;EMPLOYEE&gt;
      &lt;ID&gt;8&lt;/ID&gt;
      &lt;NAME&gt;Guru&lt;/NAME&gt;
      &lt;SALARY&gt;722.5&lt;/SALARY&gt;
      &lt;STARTDATE&gt;6/17/2014&lt;/STARTDATE&gt;
      &lt;DEPT&gt;Finance&lt;/DEPT&gt;
    &lt;/EMPLOYEE&gt;
  &lt;/RECORDS&gt;
  </code></pre>
  
  <p>The ouput from the code is supposed to look like this:</p>
  
  <pre><code>1
  Rick
  623.3
  1/1/2012
  IT
  
  
  2
  Dan
  515.2
  9/23/2013
  Operations
  
  
  3
  Michelle
  611
  11/15/2014
  IT
  
  
  4
  Ryan
  729
  5/11/2014
  HR
  
  
  5
  Gary
  843.25
  3/27/2015
  Finance
  
  
  6
  Nina
  578
  5/21/2013
  IT
  
  
  7
  Simon
  632.8
  7/30/2013
  Operations
  
  Howe
  
  8
  Guru
  722.5
  6/17/2014
  Finance
  </code></pre>
  
  <p>However, I am getting an unprocessed data (like it originally was). I don't know what to do.</p>
  
  <p>I have tried different ways of creating the <code>xml</code> file. I used MS word, a python editor, textEdit and a mac Notepad. I pasted the <code>xml</code> formatted text on each of these and saved with the extension <code>.xml</code>. I don't know what else to do. Some guidance will be much appreciated.</p>