![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Read xml from SQL server [Thread Next] Re: Read xml from SQL serverTo: NULL Date: 3/4/2005 6:29:00 PM One other thought I have looked the local xml file. It is just pure xml
starting and ending with the root element. The file output from the sql
server has <?xml version="1.0" encoding="utf-8" ?> at the begininning. Could
this confuse my stylesheet?
"Joe Fawcett" <joefawcett@h...> wrote in message
news:uLURPCDIFHA.2984@T......
> "Chris Kennedy" <ck001s7253nospam@b...> wrote in message
> news:OX1t2zCIFHA.3444@T......
> >I have an SQL Server outputting some XML - when I put the XML in a text
file
> > and load it via the C drive it loads. When I try it over http the page
> > doesn't display any data. I have playing around with streams but I can't
get
> > it to work. Can anyone point me in the right direction
> >
> >
> > set xmlDoc = CreateObject("microsoft.xmldom")
> > set xslDoc = CreateObject("microsoft.xmldom")
> > set strXML = CreateObject("adodb.stream")
> >
> > xmlDoc.async = false
> > xslDoc.async = false
> >
> > strXML.open
> > strXML.WriteText "http://localhost/nav/template/sqltemp.xml",
adWriteChar
> >
> > xmldoc.load(server.mappath("nav.xml")) - this works
> > xmldoc.load(strXML.ReadText) - this doesn't
> > xsldoc.load(server.mappath("xsl.xsl"))
> >
> > strout = xmlDoc.transformNode(xsldoc)
> >
> >
> You don't need to use a stream if the url returns xml, just use
> domdocument.load(url) or xmlhttp class.
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html
/dom_reference.asp?frame=true
>
>
> --
>
> Joe (MVP)
>
>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
