Reading DXL with MSXML parser

I am trying to read a DXL file using the following code:

'Open file on disk using MSXML parser

Set xmlDOM=createobject("Microsoft.XMLDOM")

xmlDOM.async=False

xmlDOM.validateOnParse=False

xmlDOM.load strDXLFileName



'Display result in messagebox

If (xmlDOM.parseError.errorCode <> 0) Then

	Set myErr = xmlDOM.parseError

	Msgbox("You have error code "& myErr.errorCode & ": " & myErr.reason)

Else

	Msgbox xmlDOM.xml

End If

I am getting the following error in the dialog box:

You have error code -2147024893: The system cannot find the path specified. Error processing resource ‘xmlschemas/domino_7_0_3.dtd’

Note in the code above that I have turned the validation off using xmlDOM.validateOnParse=False

How do I load the XML without using the DTD ??

TIA,

Mark.

Subject: Reading DXL with MSXML parser: WORKAROUND

It seems that the documentation for the MSXML parser is misleading: The ValidateOnParse parameter only turns off checking whether you have well formed XML.

When you have ValidateOnParse=False and you attempt to load an XML document:

  • Using the v2 parser, if a DTD is supplied the parser will attempt to find it and return an error when it can’t

  • Using the v6 parser, if a DTD is supplied the parser will return the error “DTD is not allowed”

The workaround is to output the DXL without the DTD by setting NotesDXLExporter.OutputDOCTYPE=False

Hope this saves somebody some time

Subject: Re: Reading DXL with MSXML parser: WORKAROUND

Thanks, Mark. You may never see this but OutputDOCTYPE = false on the exporter fixed the problem I was having. You’ve definitely saved me some time!

Emily