"Cannot have a DOCTYPE declaration outside of a prolog" on LoadXML in VB Macro
Posted on 2009-06-27
I've been searching for several hours for this and decided to post my first post here. I have an Excel Macro written in VB that is calling a WebService (written in ASP.net/C#). The WebService then returns an XML string to Excel. When the macro does a "LoadXML()" .. i get the "Cannot have a DOCTYPE declaration outside of a prolog."
I ran the XML string through a validator to make sure it was well-formed and it is. This is a snippit of the XML returned to Excel (it's a pretty long string):
Dim oMessageXML As New MSXML2.DOMDocument
oMessageXML.async = False
If (oMessageXML.parseError.errorCode <> 0) Then
Set myErr = oMessageXML.parseError
MsgBox ("You have error " & myErr.reason & " ErrCode: " & myErr.errorCode)
Any assistance will be greatly appreciated!!
The XML sent has a format that I then use to build another XML string. I'm not displaying this. I just need to read it so I can work with it.
This process used to use an Oracle DB and I am converting it to use SQL Server 2008. Also the project was initially in VS 2005 and I'm now running it in VS 2008 (for ASP.net). In the old instance of the project, the XML string sent back looks identical to the one I am receiving in this case.