Re: xinclude

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry the code works fine, just forgot the echo the output.


On Mon, 2007-11-19 at 22:04 +0100, Jonas Geiregat wrote:
> 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
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux