PHP Manual: DomDocument->xinclude

Enter the keyword for better results


(no version information, might be only in CVS)

DomDocument->xinclude --  Substitutes XIncludes in a DomDocument Object


int DomDocument->xinclude ( void )

This function substitutes XIncludes in a DomDocument object.

Example 1. Substituting Xincludes


// include.xml contains :
// <child>test</child>

$xml = '<?xml version="1.0"?>
<root xmlns:xi="">
  <xi:include href="include.xml">
      <error>xinclude: include.xml not found</error>

$domxml = domxml_open_mem($xml);



The above example will output:

<?xml version="1.0"?>
<root xmlns:xi="">

If include.xml doesn't exist, you'll see:

<?xml version="1.0"?>
<root xmlns:xi="">
  <error>xinclude:dom.xml not found</error>