Jump to content
Sign in to follow this  

_xmldocwrapper | Error: XML document must have a top level element.

Recommended Posts



I receive the following error while using this dom doc wrapper on win7x64 system whereas the same works fine on two other win7x64 systems:

COM error with DOM

err.windescription: variable must be of type 'object'

err.number is: 0

err.scriptline is: 1710

I added a msgbox as follows:

if $DOMVERSION > 4 Then $objDoc.setProperty ("ProhibitDTD",false)

$objDoc.Load ($strFile)

$objDoc.setProperty ("SelectionLanguage", "XPath")

$objDoc.setProperty ("SelectionNamespaces", $strNameSpc)


if $objDoc.parseError.errorCode >0 Then consoleWrite($objDoc.parseError.reason&@LF)

and I see this error msg: XML document must have a top level element.

Could someone please help here?

thank you very much

Share this post

Link to post
Share on other sites

Hi thanks John, I have figured out yesterday late evening that some code when integrated with this one was corrupting (cleaning all tags in) the xml file and hence i was getting this error on one of the machines (on which additional code was working on the xml file). so, your guess is right bout the xml file :)

thanks for trying to help :)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.