I have a series of functions already developed for working on xml files using MSXML2.DOMDocument60
. However, when I try to load a html page using the code below I get an error saying
"DTD is not allowed"
. Does anyone know what I'm doing wrong?
Dim xml As MSXML2.DOMDocument60
Set xml = New MSXML2.DOMDocument60
If xml.Load(pathToHtml) Then
Debug.Print "Success"
Else
Debug.Print "Could not load the document: " & pathToHtml
If xml.parseError.ErrorCode <> 0 Then Debug.Print "Error when loading was: " + xml.parseError.reason
End If
Thanks in advance for any advice,
John