note 50011 added to function.dom-domimplementation-createdocumenttype

From: Date: Tue, 15 Feb 2005 11:33:42 +0000
Subject: note 50011 added to function.dom-domimplementation-createdocumenttype
Groups: php.notes 
Request: Send a blank email to php-notes+get-85056@lists.php.net to get a copy of this message
If you need to create a XML Document and you need to attach a DTD file (or a SChema File) you can use this fuction to create a DOMDocument rather than DOMDocument COntructor. //NOT TESTED function CreateXMLDocumentWithAttachedDTD ($RootElement,$DTDFile) { //Create an DOMImplementation instance to make this job $implementation = new DOMImplementation; //Create a SYSTEM Entry to add at our XML Document. $dtd = $implementation->createDocumentType($RootElement, "",$DTDFile); //Generate a DOMDocument with a DTF $DOMXMLDoc = $impl->createDocument("", "", $dtd); //Now, you can work with this object to add new Elements or what you need. return $DOMXMLDoc; } ---- Manual Page -- http://www.php.net/manual/en/function.dom-domimplementation-createdocumenttype.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50011 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50011&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50011&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50011&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50011&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50011&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50011&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85056) next »