Witam!
Jak, używając DOMDocument, dodać wpisy poza głównym węzłem w tworzonych dokumentach XML. Chodzi mi głównie o dodanie informacji o arkuszu stylów .xsl.
$doc = new DOMDocument(); $doc->formatOutput = true; // processing instruction data $styleheetParams = 'href="xsl_table.xsl" type="text/xsl"'; // create processing instruction $xmlstylesheet = new DOMProcessingInstruction( 'xml-stylesheet', $styleheetParams); //append it to the doc $doc->appendChild($xmlstylesheet);