Jump to content

Cut of XML Header


The_Holy_One

Recommended Posts

i have a cdsammlung.xml file with a lot of CD Title's and Autor's, a self coded *.xsl file which works as an stylesheet on the xml and the PHP script which creates the *.rt RealText file but the problem is: Every time i create the File the first sentence is the XML Standard 1.0 Header, BUT RealText doesnt support it so i cant use the file until i delete the first sentence manually, has anybody an idea how to cut of the xml header or known a better function as save()?

Here the PHP Code:
[code=php:0] $dom = new DomDocument();
$dom->load("cdsammlung.xml");

$xsl = new DomDocument();
$xsl->load("titel.xsl"); //titel.rt

$xpr = new XsltProcessor();
//$xpr->registerPHPFunctions();
$xsl = $xpr->importStylesheet($xsl);
$output = $xpr->transformToDoc($dom);
$output->save(titel.rt); [/code]

Here the Plaintext of the RealText file:
[CODE]<?xml version="1.0" encoding="iso-8859-1"?>
<window type="generic" height="100" width="800" bgcolor="black" duration="594"><font size="6" color="red"/><clear/><time begin="0... AND so one...[/CODE]

All would be working fine WITHOUT the Sentence "<?xml version="1.0" encoding="iso-8859-1"?>" any Ideas ?
Link to comment
https://forums.phpfreaks.com/topic/27873-cut-of-xml-header/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.