Is there a generic/automatic way in R or in python to parse xml files with its nodes and attributes, automatically generate mysql tables for storing that information and then populate those tables.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Regarding
the answer is a good old yes you can, at least in R.
The XML package for R can read XML documents and return R
data.frametypes in a single call using thexmlToDataFrame()function.And the RMySQL package can transfer
data.frameobjects to the database in a single command—including table creation if need be—using thedbWriteTable()function defined in the common DBI backend for R and provided for MySQL by RMySQL.So in short: two lines can do it, so you can easily write yourself a new helper function that does it along with a commensurate amount of error checking.