Re: How to prevent DomDocument from adding a !DOCTYPE.
| From: | Rob Richards | Date: | Wed, 17 Jan 2007 12:08:44 +0000 |
| Subject: | Re: How to prevent DomDocument from adding a !DOCTYPE. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247209@lists.php.net to get a copy of this message | ||
Mathijs van Veluw wrote:
Roman Neuhauser wrote:A DTD is not required and is not automatically added to XML documents. Tags are also not automatically added either (using loadHTML methods is excluded from this statement) so not sure exactly what you are trying to do here or running into. Are you just trying to serialize a DOMDocument? <root /> is a perfectly well-formed document (though inclusion of xml declaration is *highly* recommended). Rob# mathijs.van.veluw@smscity.com / 2007-01-16 15:37:09 +0100:And how should i do this? Do you have any example avelable?Im using DomDocument currently and i realy want to prevent it from adding the !DOCTYPE and mabye even <html> and <body> etc.. Is this possible and how?Doesn't DOMDocument *require* DTD? I thought it's either that or a "document fragment" (which is probably what you're looking for).