note 98992 added to class.domimplementation
| From: | giorgio dot liscio at email dot it | Date: | Wed, 21 Jul 2010 01:26:31 +0000 |
| Subject: | note 98992 added to class.domimplementation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171003@lists.php.net to get a copy of this message | ||
officially, the w3 specifies that the way to access dom interfaces is through this class
so if you use
$doc = new DOMDocument("1.0", "UTF-8");
use instead:
$x = new DOMImplementation();
$doc = $x->createDocument(NULL,"rootElementName");
$doc->xmlVersion="1.0";
$doc->xmlEncoding="UTF-8";
it is not required by php's implementation, but, probably, it is a good practice
see:
http://w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementation
http://w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationList
http://w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationSource
----
Server IP: 81.88.49.34
Probable Submitter: 82.59.87.207
----
Manual Page -- http://www.php.net/manual/en/class.domimplementation.php
Edit -- https://master.php.net/note/edit/98992
Del: integrated -- https://master.php.net/note/delete/98992/integrated
Del: useless -- https://master.php.net/note/delete/98992/useless
Del: bad code -- https://master.php.net/note/delete/98992/bad+code
Del: spam -- https://master.php.net/note/delete/98992/spam
Del: non-english -- https://master.php.net/note/delete/98992/non-english
Del: in docs -- https://master.php.net/note/delete/98992/in+docs
Del: other reasons-- https://master.php.net/note/delete/98992
Reject -- https://master.php.net/note/reject/98992
Search -- https://master.php.net/manage/user-notes.php