note 104264 added to function.domdocument-xinclude

From: Date: Sat, 04 Jun 2011 17:11:24 +0000
Subject: note 104264 added to function.domdocument-xinclude
Groups: php.notes 
Request: Send a blank email to php-notes+get-180250@lists.php.net to get a copy of this message
On the "DomDocument->xinclude" page the xinclude method is defined as: int DomDocument->xinclude ( void ). However you can pass options to this method. If your xincluded file contains entities, these entities will not be resolved simply by setting the substituteEntities property of the DomDocument to "true". You must pass in options to the xinclude function. For example: <?php $doc = new DOMDocument(); //doc has entities, substitute them $doc->substituteEntities = true; $source = "/path/to/file.xml"; $doc->load($source); //do this to resolve entities in an xincluded file $options = LIBXML_NOENT; $doc->xinclude($options); ... ?> ---- Server IP: 69.147.83.197 Probable Submitter: 99.232.79.67 ---- Manual Page -- http://www.php.net/manual/en/function.domdocument-xinclude.php Edit -- https://master.php.net/note/edit/104264 Del: integrated -- https://master.php.net/note/delete/104264/integrated Del: useless -- https://master.php.net/note/delete/104264/useless Del: bad code -- https://master.php.net/note/delete/104264/bad+code Del: spam -- https://master.php.net/note/delete/104264/spam Del: non-english -- https://master.php.net/note/delete/104264/non-english Del: in docs -- https://master.php.net/note/delete/104264/in+docs Del: other reasons-- https://master.php.net/note/delete/104264 Reject -- https://master.php.net/note/reject/104264 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180250) next »