domdocumenttype

PHP DOM: change doctype of existing DOMDocument

When creating a DOMDocument with DOMImplementation::createDocument(), you can specify a doctype as the third argument in the constructor. This doctype then gets "tied" to the document and you can retrieve it later with $document->doctype. However, this is a read-only attribute (unlike encoding and version!). Is there any way to change...