I am a long time user of perl, since v3, and a long time lurker here on Perl Monks. For the first time, I have not be able to find an answer or at least a pointer to get to the an answer my question. I guess that means my perl wisdom may finally be reaching a higher level :)
In any case, I am working on a program that queries publicly available data from multiple sources on the internet and loads it into a relational database for analysis. Most of these return the reply to their query in XML. Most of the sites provide a brief explanation of what a query will return; however, none, as of yet, have a published XSD. With a few spits and spurts, I have been successful in parsing the responses using XML::LibXML and then loading the data into the database with DBI. However, I am currently hand coding the XML to SQL mapping and the related inserts/updates. I do not like this pattern because it means that I have to embed my mapping and update/insert logic in code for each source. This does not scale well and will create a support headache down the road.
I am doing some testing with DBIx::Class to clean up at least the insert/update portion of the code and this will be a significant step if it works out right. But DBIx::Class got me thinking about my question:
Is there a perl module or pattern that I can use to map the XML to the database so that implementation is simply configuration and execution is a call?
I have spent a lot of time over the last week investigating here and across the internet; but I have not found much. I did find a few old modules, 8 - 10 years old that attempted to do this; however, none appear to have gotten off the ground.
Any guidance in this direction with be appreciated!!
lbeIn reply to ORM for XML to DB - does one exist? by learnedbyerror
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |