youp,
 
 
j'ai un fichier xml:
| Code : 
 <?xml version="1.0" encoding="ISO-8859-1"?><root xmlns:xi="http://www.w3.org/2001/XInclude">   <brol>	<patapouet>	   pouet	</patapouet>   </brol>   <modules>	<xi:include href="mod_news.xml">	   <xi:fallback>	      <error>xinclude: mod_news.xml not found</error>	   </xi:fallback>	</xi:include>   </modules></root>
 | 
 
je voudrais générer cette partie dynamiquement
 
| Code : 
 <xi:include href="mod_news.xml">   <xi:fallback>	<error>xinclude: mod_news.xml not found</error>   </xi:fallback></xi:include>
 | 
 
pour ca, je fais :
 
| Code : 
 <?$xpath = new DomXPath($xml);$xparent = $xpath->query('/root/modules')->item(0);$xml_string = '<xi:include href="mod_cal.xml"><xi:fallback><error>xinclude: mod_cal.xml not found</error></xi:fallback></xi:include>';$sxe = simplexml_load_string($xml_string);$dom_sxe = dom_import_simplexml($sxe);$dom_sxe = $xml->importNode($dom_sxe, true);try {	$xparent->appendChild($dom_sxe);}catch (Exception $e) {	echo $e;}
 | 
 
-> Erreur:  
| Citation : 
 
 Warning: namespace error : Namespace prefix xi on include is not defined
 | 
 
 
donc j'ajoute:  
| Code : 
 $xml->createAttributeNS("http://www.w3.org/2001/XInclude", "xmls:xi" );
 | 
 
mais ca ne change rien  
 
 
quelqu'un pourrait me guider un peu ?
 
 
merci 
 
 ---------------
			
oui oui