xinclude

From: Date: Mon, 19 Nov 2007 21:04:31 +0000
Subject: xinclude
Groups: php.general 
Request: Send a blank email to php-general+get-264799@lists.php.net to get a copy of this message
I've been playing with DOMDocument->xinclude but it just doesn't seem to work for me. test.php: <?php header('set content-type: text/xml'); $doc = new DomDocument; $doc->preserveWhiteSpace = false; $doc->formatOutput = true; $doc->load('test.xml'); $doc->xinclude(); $doc->saveXML(); ?> test.xml: <?xml version="1.0"?> <bar xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="foo.xml"> <xi:fallback> <error>xinclude: book.xml not found</error> </xi:fallback> </xi:include> </bar> foo.xml: <?xml version="1.0"?> <test> <foo>sfsd</foo> </test> The output of test.php is nothing plain white space. Any help is appreciated. thanks in advance Jonas

« previous php.general (#264799) next »