Using PHP 5's SimpleXML
Subject:   SimpleXML and XSLT in PHP5
Date:   2004-01-16 12:27:44
From:   trachtenberga
Response to: SimpleXML and XSLT in PHP5

There are many new XML features in PHP5, including rewritten DOM, XSLT, and XPath classes. Unfortunately, I could not cover them all here.

PHP 5's XSLT class uses libxsl, the sister library to libxml2. You pass the class DOM objects and it transforms files for you. This interface is cleaner than the PHP 4 XSLT extension, which used the Sablotron XSLT parser and didn't integrate with other PHP XML extensions.

The current issue of PHP Magazine's Digital Edition ( contains an article by me that gives a few examples of how to use XSLT with PHP 5. (Unfortunately, this article is not available for free.)

So, to answer your question, if you're using PHP 4 and want to do more XSLT, then PHP 5 is definitely a step up. I hope that helps. Let me know if you have other questions.