W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

How Can I omit DOCTYPE using Tidy COM/MXSML

From: ciaran byrne <ciaran.byrne@3tl.com>
Date: Fri, 28 Jul 2000 06:46:55 -0400 (EDT)
To: <html-tidy@w3.org>
Message-ID: <NEBBLJNNBKLFNDLBENOPCECGCEAA.ciaran.byrne@3tl.com>
Hi all,
	I using Tidy COM to convert my HTML to XML and then use MSXML.
The problem I'm getting is that even though I set the doctype to omit,
I still get the doctype outputted by Tidy. I also seem to get a HTML DOCTYPE
even though the output is XML which in my eyes would mean an XML DOCTYPE.
As a result MSXML doesn't like this DOCTYPE and coughs up an error.
Is there any way for the DOCTYPE to be omitted, or is there a workaround ?
Below is my code:

Set TidyObj = CreateObject("TidyCOM.TidyObject")
TidyObj.Options.doctype = "omit"
TidyObj.Options.NumericEntities = True
TidyObj.Options.TidyMark = False
TidyObj.Options.UppercaseTags = True
TidyObj.Options.OutputXml = True
strHTML = TidyObj.TidyToMem(strHTML)

' XML is loaded here
docXML.loadXML (strHTML)

If docXML.parseError.errorCode <> 0 Then
 .....

Here is my error:
The public ID "-\\W3C\\DTD HTML 4.0 Transitional\\EN" is invalid.

Anyone have any suggestions ?

Ciaran
Received on Friday, 28 July 2000 13:53:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT