XML + XPath w/ PHP4-5

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
mrkris
Forum Newbie
Posts: 2
Joined: Fri Sep 01, 2006 10:16 pm

XML + XPath w/ PHP4-5

Post by mrkris »

I am in a world of hurt here. I have the idea for a web application I would like to do, but unfortunately 90% of my clientbase are php4. I could use DOMXML and what not, but it is php4 only and will not work under php5, whereas php5 has simplexml which rocks, but is only php5. I need an alternative to this, as the config files are XML (icky, I know, but I have my reasons), so if anyone could give me a hand in recommending something that would work for both php4+5 and not be a dirty hack, I would appreciate it.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Create a wrapper class to each with the same interface then include the correct file and instantiate it to feed to your other code.
mrkris
Forum Newbie
Posts: 2
Joined: Fri Sep 01, 2006 10:16 pm

Post by mrkris »

feyd wrote:Create a wrapper class to each with the same interface then include the correct file and instantiate it to feed to your other code.
Sounds like a good idea, I might head that direction I suppose.
Post Reply