Created
March 13, 2015 20:32
-
-
Save ubiratanbraga/1b440b4b78376d40c1bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Load the XML source | |
| $xml = new DOMDocument; | |
| $xml->load('collection.xml'); | |
| $xsl = new DOMDocument; | |
| $xsl->load('collection.xsl'); | |
| // Configure the transformer | |
| $proc = new XSLTProcessor; | |
| $proc->importStyleSheet($xsl); // attach the xsl rules | |
| echo $proc->transformToXML($xml); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment