My PHP script tries to load a valid XHTML5 file, do some manipulations using the DOM, and output it to the client.
However, in order to use document::getElementById()
, I have to validate the document first.
The PHP script can not do so because there is no DTD in HTML5. How can I do this?