Jump to content


This topic is now archived and is closed to further replies.


Setting a Doctype with the DOM API

Recommended Posts

  I'm using PHP5's DOM API (http://www.php.net/manual/en/ref.dom.php) to build a XHTML 1.1 page. I can successfully create a DOMDocument object, but how do I modify the DOCTYPE of the DOMDocument object? Please note that the DOMDocument::doctype property is read-only.

In a nutshell, I'd like to build one very simple XHTML 1.1 compliant web page using just the DOM API.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.