ID: 38578 User updated by: dandrikop at cosmote dot gr Reported By: dandrikop at cosmote dot gr -Status: Feedback +Status: Open Bug Type: DOM XML related Operating System: Fedora Core 5 PHP Version: 5.1.5 New Comment:
As the documentation says at "http://www.php.net/manual/en/function.dom-domimplementation-createdocumenttype.php" the following code: ====================================================== <?php // Creates an instance of the DOMImplementation class $imp = new DOMImplementation; // Creates a DOMDocumentType instance $dtd = $imp->createDocumentType('graph', '', 'graph.dtd'); // Creates a DOMDocument instance $dom = $imp->createDocument("", "", $dtd); // Set other properties $dom->encoding = 'UTF-8'; $dom->standalone = false; // Create an empty element $element = $dom->createElement('graph'); // Append the element $dom->appendChild($element); // Retrieve and print the document echo $dom->saveXML(); ?> ====================================================== produces: ====================================================== <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE graph SYSTEM "graph.dtd"> <graph/> ====================================================== So how can someone produce the following XML? ====================================================== <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE graph SYSTEM "graph.dtd"[ <!ENTITY testme "HELLO"> ]> <graph/> ====================================================== Previous Comments: ------------------------------------------------------------------------ [2006-08-24 10:25:29] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ [2006-08-24 10:23:53] dandrikop at cosmote dot gr Description: ------------ Cannot create internal entity declarations with DOMImplementation object like the following: <!DOCTYPE clickAPI SYSTEM "my.dtd" [ <!ENTITY testme "HELLO"> ]> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38578&edit=1