XML with PHP

From: Date: Sat, 21 Oct 2000 20:27:31 +0000
Subject: XML with PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21585@lists.php.net to get a copy of this message
I'm writing a little web app for my site and have been mulling over the flap about XML. What are the advantages of using XML with PHP? I assume I have to create my own XML tags and write a PHP parser to translate them into HTML. As it stands now, my app has a generic low-level data management and a high-level data display/user interface that uses templates and calls to the low-level to pull data from various sources to build the page. The templates are all in HTML. Would it be advantageous to convert the templates to XML and write a low-level parser that translates the templates to HTML? Or would that be a high-level parser? Part of my concern is the up-coming proliferation of Web-enable devices from PDA's to even cellphones that could process data from sites I write. It sounds very cpu intensive, but I've seen XML being used in everything from IDE's to actual application formats and, of course, the web so it looks like XML is here to stay. I want my site to be fast, so if I use XML with PHP, what would be the best way to keep the speed up, if there is a way? In the HTML templates, I've broken out everything I don't have to echo into actual static tags to keep things fast. But if it's all in XML, it'd have to go through a parser before it could be displayed. That sounds a little slow, especially under load. Also, there's precious little in the way of web resourse and examples in XML with PHP in an actual working environment and the PHP manual is a little shy on examples too - any references? My development system uses the latest PHP with all the bells and whistles and MySQL on Linux/Apache, as does my production server and I've played a little with some basic XML scripts - if that helps in the answer. Mike

« previous php.general (#21585) next »