I've created a VBscript to validate an XML file. The essence of the XML validation consists of the following code:
. . .
Set xmlDoc = CreateObject("Msxml2.DOMDocument.5.0")
xmlDoc.validateOnParse = True
xmlDoc.async = False
xmlDoc.load(sbrpFilename)
If xmlDoc.parseError.errocode <> 0 Then
. . .<error handler here>. . .
. . .
sbrpFilename is just a string to the XML file that needs to be validated. Now, this works fine under nearly all circumstances. I've had an enhancement request to modify the VBscript as the XML file that needs to be validated contains a DTD directive as follows (i've left out some of the detail):
<!DOCTYPE ... http://.../config_1_0.dtd">
This means that the XML parsing requires access to an external Web site (referenced in the URL) to retrieve the 'schema' for the XML document. Is it possible to get the XML parser to ignore the <!DOCTYPE> and DTD directive?
I just need to be able to do a basic XML validation without retrieving anything from the Internet (as the PC that runs my VBscript is not allowed Internet connectivity).
I'm hoping that I can just set a property in the xmlDoc object to do this.