IIS ASP - Not sure which object to use to load xml into xsl

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > February 2007 > Not sure which object to use to load xml into xsl





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Not sure which object to use to load xml into xsl
Chuck

2007-02-14, 1:20 pm

Hello,
I am having trouble loading the returned XML from a Webservice into my XSL.
Any suggestions would be appreciated.


' Build custom HTTP header
xmlServerHttp.open "POST", "https://.../Site.asmx", False ' False = Do not
respond immediately
xmlServerHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlServerHttp.setRequestHeader "Content-Length", Len(SoapBodyStr)
xmlServerHttp.setRequestHeader "SOAPAction",
"http://tempuri.org/GetSiteDetail"
xmlServerHttp.send(SoapBodyStr)

set xmlServerHttp = nothing

Dim oXmlsrc, oRootNode, oXslsrc, newXML, re, oXslTemplate, oXslProcessor
' If you're using an XSLTemplate and XSLProcessor object,
' you have to use the FreeThreaded versions of DOMDocument

Set oXmlsrc=CreateObject("MSXML2.FreeThreadedDOMDocument.4.0")
Call oXmlsrc.setProperty("ServerHTTPRequest", True) <<<<<<<<<<<< <<<<
should this be changed to xmlServerHttp?
oXmlsrc.async=False

Set oXslsrc=CreateObject("MSXML2.FreeThreadedDOMDocument.4.0")
Call oXslsrc.setProperty("ServerHTTPRequest", True) <<<<<<<<<<<<<<<<<
should this be changed to xmlServerHttp?
oXslsrc.async=False

Set oXslTemplate = Server.CreateObject("MSXML2.XSLTemplate.4.0")

' If I haven't posted the form first, then load my unaltered XML.
' If I'm posting info to resort or edit, then build my XML from that.

'On Error Resume Next 'debugging code

If Request.Form("acctname") = "" Then
Call oXmlsrc.load(???????)
<<<<<<<<<<<<<<<<<<<<<<<<< what object should be here?
'Response.Write "<!-- " & oXmlSrc.xml & " -->" 'debugging code
newXML=oXmlsrc.xml
Set re=new regexp
re.pattern=" xmlns.+?>"
newXML=re.replace(newXML,">")
Call oXmlsrc.loadxml(newXML)
else
....


Anthony Jones

2007-02-15, 7:21 am


"Chuck" <nospam@topsecurityinc.com> wrote in message
news:eKv6oLGUHHA.1000@TK2MSFTNGP05.phx.gbl...
> Hello,
> I am having trouble loading the returned XML from a Webservice into my

XSL.
> Any suggestions would be appreciated.
>
>


Reply in microsoft.public.xml


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com