Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Read xml from SQL server

From: "Chris Kennedy" <ck001s7253nospam@---------.--.-->
To: NULL
Date: 3/4/2005 6:23:00 PM
Ihave tried xmldoc.load it just displays a blank page. When I do a
response.write on the url and copy and paste in my browser it displays the
xml. So I can load it in from a local file but not a url. I don't get an
error just a blank page when I do my output. I'm clutching at straws but
could it be something firewall related or security related or maybe the xml
isn't loading quickly enough. Stumped!


xmldoc.loadxml("http://localhost/nav/template/sqltemp.xml") - template file
doesn't work
xmldoc.loadxml(strServer) - string with the query appended to the url
doesn't work
xmldoc.load(server.mappath("file.xml")) - local file with the same xml does
work!??!

And by doesn't work I mean a blank page not an error. When I look at the
source I get <?xml version="1.0" encoding="UTF-16"?><table></table>
as if some but not all the transformation is not working or the xsl file
can't find the nodes in the url.

strout =  xmlDoc.transformNode(xsldoc)
response.write strout


"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)
>
>




transparent
Print
Mail
Digg
delicious
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