DOMDocument->xinclude()
Substitutes XIncludes in a DOMDocument Object
&reftitle.description;
DOMDocument
int
xinclude
This method substitutes XIncludes in a DOMDocument object.
Due to libxml2 automatically resolving entities, this method will produce
unexpected results if the included XML file have an attached DTD.
&reftitle.returnvalues;
Returns the number of XIncludes in the document.
&reftitle.examples;
DOMDocument->xinclude() example
Books of the other guy..
xinclude: book.xml not found
EOD;
$dom = new DOMDocument;
// let's have a nice output
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
// load the XML string defined above
$dom->loadXML($xml);
// substitute xincludes
$dom->xinclude();
echo $dom->saveXML();
?>
]]>
&example.outputs.similar;
Books of the other guy..
The Grapes of Wrath
John Steinbeck
en
0140186409
The Pearl
John Steinbeck
en
014017737X
Samarcande
Amine Maalouf
fr
2253051209
]]>