Page 1 of 1

XML + XPath w/ PHP4-5

Posted: Fri Sep 01, 2006 10:21 pm
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.

Posted: Fri Sep 01, 2006 10:38 pm
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.

Posted: Fri Sep 01, 2006 11:00 pm
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.