php xml new DOMDocument xml- load main xml xsl new DOMDocument xsl- lo

1
2
3
4
5
6
7
8
9
<?php
$xml = new DOMDocument;
$xml->load('main.xml');
$xsl = new DOMDocument;
$xsl->load('rss.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl);
echo $proc->transformToXML($xml);