You are here:  » Using multiple XML files


Using multiple XML files

Submitted by Boomjdotcom on Thu, 2007-05-03 17:58 in

I have two different XML files that I want to link to the parser so I can access the data contained in both of them. Is it possible to do this and if so, how?

Example:

One XML file containing Movie show times that include a Movie ID for easy reference and a Theater ID, and one XML file containing Theater IDs, addresses, etc.

I want to be able to load a page that displays results based on a Zipcode search that will display a Theater name, address, etc AND the showtimes associated with that theater. In order for this to work, I need to load both XML files.

Submitted by support on Thu, 2007-05-03 18:03

Hi,

In this application, it is unlikely that pages generated for your user would be derived by directly parsing the XML. Instead, what I would recommend that you look at doing is using a parser to import both XML files into an appropriately structured database, and then make queries on the database to display theatres and showtimes etc.

Magic Parser is almost certainly suitable for processing both files; although you would have to write your own code (within the record handler function) to import the data into a database. If you want to look into doing this sort of thing with MySQL (the most commonly used database with PHP), I would suggest starting with the mysql function documentation on php.net, which makes a pretty good tutorial...

http://uk.php.net/manual/en/ref.mysql.php

Hope this helps,
Cheers,
David.