XML + Xslt ->

0 Cevap php

I know that there are really a mass of XML XSLT php merging threads at SO. But php specific i could not found what might my problem:

$xml = new DOMDocument;
$xml->load("f.xml");

$xsl = new DOMDocument; $xsl->load('test.xsl');

// init and configure processor $proc = new XSLTProcessor; $proc->importStyleSheet($xsl); // import xsl document $xml2=$proc->transformToXML($xml); echo $xml2;

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="owner" select="'Robert Kühn'"/>
<xsl:output method="xml" version="1.0" omit-xml-declaration="yes" indent="no"/> 
<xsl:strip-space elements="*"/>
</xsl:stylesheet>
and one xml file as example:
<?xml version="1.0" encoding="UTF-8"?>
<xPac>
<xyz id="15603"><varrDaten id="15604" zeit="1271099572" rechte="1">Daten<vbuch><vsyautor>Alertz, Ulrich</vsyautor><vsytitel>Vom Schiffbauhandwerk zur</vsytitel><vsybarcode>20560194</vsybarcode><vsystatus>S</vsystatus></vbuch><vbuch><vsyautor>Ridolfi, Carlo�[Hrsg.]�</vsyautor><vsytitel>Vite dei Tintoretto da le</vsytitel><vsybarcode>20014784</vsybarcode><vsystatus>S</vsystatus></vbuch><vbuch><vsyautor>Ridolfi, Carlo�[Hrsg.]�</vsyautor><vsytitel> life of Tintoretto and o</vsytitel><vsybarcode>20074791</vsybarcode><vsystatus>S</vsystatus></vbuch></varrDaten></xyz></xPac>
My xslt file looks a bit empty.. However i tried ´output method="xml"´. but it doesnot help.. the xml file is huge and i guess not so important

Soru: PHP metin veya html olarak daima veri döndürür ama XML .. ben yanlış ne yapıyorum ki? Ben sadece XSLT ile XML düzenleme ve XML (dosya) geri kurtarmak istiyorum.

Yardımlarınız için teşekkürler!

0 Cevap