Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Vbscript...xml load problem... please help

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 5/1/2007 5:53:00 PM
jdzurek@u... wrote:
> I dont know if its my computer.... but i did all the xml updates that
> microsoft has to offer and i'm still getting the errror code 800A01A8
> "Object required" for my code. Although the code works on my boss'
> computer :-/ any suggestions. (error is on line 13)
> 
> 01 Option Explicit
> 02
> 03 Dim xmlFile, xmlConfig, Xsep
> 04
> 05 Set xmlFile= CreateObject("MSXML2.DOMDocument.3.0")
> 06
> 07 xmlfile.load "C:\BankingTs\Transcrypt.xml"
> 08
> 09
> 10 Set xmlconfig = xmlfile.documentElement
> 11
> 12 Set XSep = xmlFile.SelectSingleNode("//Setup/Separator")
> 13 wscript.echo XSep.text

First set
   xmlfile.async = False
then call load
   xmlfile.load "C:\BankingTs\Transcrypt.xml"
then check
   If xmlfile.parseError.errorCode <> 0 Then
     WScript.Echo "Parse error: " & xmlfile.parseError.reason
   Else
     ' now script the document here
   End If

If you still get an error then show us the relevant XML document, 
selectSingleNode will not find anything and return Nothing with VBScript 
if the XPath does not select a node in the document.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent