downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

collection.xml> <Predefined Constants
Last updated: Fri, 20 Nov 2009

view this page in

Examples

Table of Contents



add a note add a note User Contributed Notes
Examples
contato at log dot blog dot br
16-Oct-2008 12:43
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.

collection.xml> <Predefined Constants
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites