Skip to content
Prev 359748 / 398503 Next

How to convert XML file to R Data Frame?

Check out the XML package for complete information, and the xml2 package
for extracting data from XML.

I don't think you can directly read the XML into a dataframe because of the
hierarchical structure of the data.  There are functions to read an HTML
table into a dataframe.  I think you have to take a close look at your data
and determine what you want from it, then extract the data and put it into
the appropriate structure.  It would have been nice if you at least showed
a sample of the XML was and what you were expecting to get from it.

I have used both of the packages to extract data from moderate files
(~16,000 lines in length).


Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

On Fri, Apr 1, 2016 at 12:08 PM, Muhammad Bilal <
Muhammad2.Bilal at live.uwe.ac.uk> wrote:

            

  
  
Message-ID: <CAAxdm-4EKbaeZ5kfp4wTVAKdYZNS7tXW6YicordMbnsdARFizw@mail.gmail.com>
In-Reply-To: <DB5PR07MB1109052DBC6D3B8EB6A5AB32DB9A0@DB5PR07MB1109.eurprd07.prod.outlook.com>