[nycphp-talk] Translating XML to SQL
Eric Rank
erank at isthmus.com
Wed Feb 11 13:22:36 EST 2004
I'm working on a PHP app that will translate XML to SQL based on a configuration file with rules, and as I'm getting to the end of this project, all the quirks and airbubbles (yes, ok, they're BUGS) are getting squeezed out. And man, it's no fun. So now I'm looking for solutions that may have been created before me.
Specifically, the xml contains information from articles in a newspaper. Author, issue, volumne, section, category, headline, story, etc. This xml we get from an export from QuarkXPress (which is its own nightmare)
I'm trying to take this xml structure that contains NO database specific information and place it into a MySQL database with about a dozen related tables. The trick is that in going through an xml file, there are a lot of contigencies to cover before finally reaching the database. For example, some INSERT statements require the inserted id of a previous insert statement in order to make the records relational (eg. we need to insert the 'story' info into the 'article' table to get the inserted id for the article, which then gets inserted into the 'photos' table in the 'articleID' column.). Some insert statements might not need to happen because the information already exists (eg. an author that already exists in the database). You get the idea.
Anyone have experience doing this? Is there an open source project out there that's working on this? Third party software even?
Thanks for your help,
Eric Rank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20040211/5083c4ee/attachment.html>
More information about the talk
mailing list