I'm writing something (in C++ on Windows) that outputs HTML, and uses the MSXML DOM to do it. This is easy enough. But there's one thing that has me stuck. At the top of any HTML you have some nonsense:
And I can't figure out how to write that with the DOM. It's obviously not a regular XML element. I found some mention of a NODE_DOCUMENT_TYPE value, but passing that into createNode fails. The only other thing I can think to do is use loadXML with the above in a string when I create the DOM, and then add other things to it, but that fails too.
Anyone know how to do this? It must be simple.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Anyone know how to do this? It must be simple.


utput/>; you can also get it to generate the document type declaration for you:
Comment