title: How to create an R data frame from an xml file?
body: <p>I have an XML Document file. The part of the file looks like this:</p>
  <pre><code>-&lt;attr&gt;  
       &lt;attrlabl&gt;COUNTY&lt;/attrlabl&gt;  
       &lt;attrdef&gt;County abbreviation&lt;/attrdef&gt;  
       &lt;attrtype&gt;Text&lt;/attrtype&gt;  
       &lt;attwidth&gt;1&lt;/attwidth&gt;  
       &lt;atnumdec&gt;0&lt;/atnumdec&gt;  
      -&lt;attrdomv&gt;  
          -&lt;edom&gt;  
              &lt;edomv&gt;C&lt;/edomv&gt;  
              &lt;edomvd&gt;Clackamas County&lt;/edomvd&gt;  
              &lt;edomvds/&gt;  
           &lt;/edom&gt;  
          -&lt;edom&gt;  
              &lt;edomv&gt;M&lt;/edomv&gt;  
              &lt;edomvd&gt;Multnomah County&lt;/edomvd&gt;  
              &lt;edomvds/&gt;  
           &lt;/edom&gt;  
          -&lt;edom&gt;  
              &lt;edomv&gt;W&lt;/edomv&gt;  
              &lt;edomvd&gt;Washington County&lt;/edomvd&gt;  
              &lt;edomvds/&gt;  
           &lt;/edom&gt;  
       &lt;/attrdomv&gt;  
   &lt;/attr&gt;
  </code></pre>
  <p>From this XML file, I want to create an R data frame with the columns of <code>attrlabl</code>, <code>attrdef</code>, <code>attrtype</code>, and <code>attrdomv</code>. Please note that the <code>attrdomv</code> column should include all of the levels for the category variable. The data frame should look like this:</p>
  <pre class="lang-r prettyprint-override"><code>attrlabl    attrdef                attrtype    attrdomv  
  COUNTY      County abbreviation    Text        C Clackamas County; M Multnomah County; W Washington County  
  </code></pre>
  <p>I have an incomplete code like this:</p>
  <pre class="lang-r prettyprint-override"><code>doc &lt;- xmlParse(&quot;taxlots.shp.xml&quot;)  
  dataDictionary &lt;- xmlToDataFrame(getNodeSet(doc,&quot;//attrlabl&quot;))  
  </code></pre>
  <p>Could you please complete my R code? I appreciate any help!</p>