note 86382 added to xsl.examples

From: Date: Thu, 16 Oct 2008 00:43:50 +0000
Subject: note 86382 added to xsl.examples
Groups: php.notes 
Request: Send a blank email to php-notes+get-145394@lists.php.net to get a copy of this message
Here's a very simple example on how to use PHP5 to transform a XML file using a XSL file. <?php $xslDoc = new DOMDocument(); $xslDoc->load("collection.xsl"); $xmlDoc = new DOMDocument(); $xmlDoc->load("collection.xml"); $proc = new XSLTProcessor(); $proc->importStylesheet($xslDoc); echo $proc->transformToXML($xmlDoc); ?> For the sake of simplicity there's no error handling on this code. I hope this helps. ---- Server IP: 200.185.126.110 Probable Submitter: 200.202.193.1 ---- Manual Page -- http://www.php.net/manual/en/xsl.examples.php Edit -- https://master.php.net/note/edit/86382 Del: integrated -- https://master.php.net/note/delete/86382/integrated Del: useless -- https://master.php.net/note/delete/86382/useless Del: bad code -- https://master.php.net/note/delete/86382/bad+code Del: spam -- https://master.php.net/note/delete/86382/spam Del: non-english -- https://master.php.net/note/delete/86382/non-english Del: in docs -- https://master.php.net/note/delete/86382/in+docs Del: other reasons-- https://master.php.net/note/delete/86382 Reject -- https://master.php.net/note/reject/86382 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145394) next »