DomDocument->xinclude substitue XIncludes dans un objet DomDocument.
<?php// include.xml contient :// <child>test</child> $xml = '<root xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="include.xml"> <xi:fallback> <error>xinclude: include.xml n\'a pas été trouvé</error> </xi:fallback> </xi:include></root>';$domxml = domxml_open_mem($xml);$domxml->xinclude();echo $domxml->dump_mem();?>