I've a couple directories filled with thousands of xml files.
I'm expected to generate, menu's with html links from each directory. I was thinking of using scandir() for that.
Also all these xml files should be reachable with their filename in the url.
For example in the article directory the xml file named news.xml should be reachable like this:
http://www.website.com/article/news.php
2nd example in the articles directory the xml file named helpwithjeans.xml should be reachable like this:
http://www.website.com/article/helpwithjeans.php?l=0
3rd example in the products directory the xml file named bluray.xml should be reachable like this:
http://www.website.com/product/bluray.php?l=1
How to read what url is typed and process it by going to the right xml file? After that the xml still needs to be converted to one of several specific html formats.
Something like using the parameter "l" see in above examples (2nd and 3rd) to know which layout is desired and which xml elements to grab.
How can this be handled? And if there is multiple options, what do you suggest is a good way to handle this.
Thanks for pointing me in the right direction!
I was thinking XSLT might be the way to convert the xml to html but I don't know how to use the "l" parameter from the url (if I'm heading int hat direction) in the XSLT and that would really be needed.
I'm really open to any input. Everything may help. Thanks a lot.
Asking for suggestions on how to work with XML files in PHP
Moderator: General Moderators
-
ShotokanTuning
- Forum Newbie
- Posts: 3
- Joined: Thu Oct 02, 2008 6:54 am