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
DOMImplementation sınıfı
(PHP 5)
Giriş
İşlemleri belli bir belge nesne modeli örneğinden bağımsız olarak gerçekleştirmek için bazı yöntemler sunan bir arayüz.
Sınıf Sözdizimi
DOMImplementation
{
/* Özellikler */
/* Yöntemler */
__construct
( void
)
DOMDocument createDocument
([ string
$uri = NULL
[, string $önekliAd = NULL
[, DOMDocumentType $belgeTürü = NULL
]]] )
DOMDocumentType createDocumentType
([ string
}$belgeAdı = NULL
[, string $publicId = NULL
[, string $systemId = NULL
]]] )İçindekiler
- DOMImplementation::__construct — Yeni bir DOMImplementation nesnesi oluşturur
- DOMImplementation::createDocument — Belge elemanı belirtilen DOMDocument nesnesini oluşturur
- DOMImplementation::createDocumentType — Boş bir DOMDocumentType nesnesi oluşturur
- DOMImplementation::hasFeature — DOM gerçeklenimi belirtilen özelliğe sahip mi diye bakar
giorgio dot liscio at email dot it
20-Jul-2010 06:26
