How to make request on many separated xml files ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
trungsg
Forum Newbie
Posts: 5
Joined: Mon Feb 06, 2006 3:57 am

How to make request on many separated xml files ?

Post by trungsg »

Hi all,
any one know how to make a request (XPath for example) on many separated xml files ? Because my data is a set of separated xml files.

Thanks for answer !!!!
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

what do you mean by "making a request"? pulling a specific node from the XML?
trungsg
Forum Newbie
Posts: 5
Joined: Mon Feb 06, 2006 3:57 am

Post by trungsg »

example : i want to find out all <book> nodes that have price > 30 usd (but the data is store in many different xml files, whole these files have the same dtd), so i have to make something like XQuery or XPath but how to do with many xml files (not only on one file).
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

open the first file, search for the data you need, pull out the data you need, close the file, open the next, repeat until no more files.
Post Reply