Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Reading XML from a URL with VBScript >Thread Next - Re: Reading XML from a URL with VBScript Re: Reading XML from a URL with VBScriptTo: NULL Date: 7/2/2004 12:41:00 PM Try xmlhttp instead of DOM. I've not yet tried myself against https if I
recall correctly.
set xh=createobject("msxml2.xmlhttp")
xh.open "get", URL, false
xh.send
msgbox xh.responsexml.xml
"Jesse" <anonymous@d...> wrote in message
news:246f801c45fdf$a83fb670$a601280a@p......
> Ok thanks, that works for the test xml file i have been
> trying to get to work on the webserver here but there is
> another xml url on a https site which i need to get
> information from that is still not working. This time
> however the script brings up no error message. If i use
> the url in my browser for the https site i am using in the
> code, i can see the XML file contents in the browser.
>
> /************************
> Code Snippit
> *************************/
> //url = the https site with various login components
>
> Set theXML = CreateObject("MICROSOFT.XMLDOM")
> theXML.async=false
> theXML.load(url)
>
> if theXML.parseError.errorCode = 0 Then
>
> msgbox(theXML.documentElement.firstChild.text)
>
> end if
>
> set theXML = nothing
>
> /******************
> End Snippit
> ******************/
>
> Jesse
>
>
> >-----Original Message-----
> >Then one thing I can imagine is async property. Do before
> loading,
> >
> >xmldoc.async=false
> >
> >If you still have a problem, show us your code please.
> >
> >"Jesse" <anonymous@d...> wrote in
> message
> >news:24a9701c45fda$cb0295b0$a301280a@p......
> >> Thanks for the quick reply.
> >>
> >> It runs as a stand alone VBScript (not using ASP) and i
> am
> >> manually running it from my computer (not the web
> server).
> >>
> >>
> >> >-----Original Message-----
> >> >Where does your script run, ASP or something?
> >> >
> >> >"Jesse" <anonymous@d...> wrote in
> >> message
> >> >news:24a8601c45fd8$674bebe0$a301280a@p......
> >> >> Hi All,
> >> >>
> >> >> I have a question regarding reading XML from a URL
> using
> >> >> VBScript. I am able to read an xml file that is
> stored
> >> >> locally with VBScript but when i try and access the
> same
> >> >> file through a url (via a webserver)instead of a
> direct
> >> >> local path, nothing is read. I get the error "Object
> >> >> Required" on the line:
> >> >>
> >> >> msgbox(theXML.documentElement.firstChild.text)
> >> >>
> >> >> If i type the url in my browser it brings up the
> >> contents
> >> >> of the file in the browser window.
> >> >>
> >> >> I am new to XML so any information on the subject
> would
> >> be
> >> >> appreciated.
> >> >>
> >> >> Thanks,
> >> >> Jesse
> >> >>
> >> >>
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
