Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Vbscript...xml load problem... please help [Thread Next] Re: Vbscript...xml load problem... please helpTo: 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/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
