R
Robert J Egan
Hi i'm trying to search a remote website page. The form returns xml
information, though the page extension is missing. I retrieve the
information and write it to the screen. So far so good - However i cannot
format this information in anyway. A copy of the returned information saved
to my server results in the xml data being formatted and displayed as
intended! Can anyone explain to me why one would work but not the other.
Regards
Robert Egan
-- Code Below --
str_HC_url - variable formed from form information
xml.Open "GET", str_HC_url , false - line of code used - does not work
The above brings back info but cannot be formatted using code below.
Set xml = Server.CreateObject ("Microsoft.XMLHTTP")
xml.Open "GET", "http://www.accessburnley.co.uk/xml/asp/cdcatalog.xml" ,
false - alternate line of code - does work.
xml.Send
text = xml.ResponseText
If xml.Status = 200 Then
Set oResponseXML = xml.ResponseXML
bXMLLoadError = False
Else
Response.Write("<font color=""red"">Page Error: Could not load XML from
remote server</font><br>")
bXMLLoadError = True
End If
Set xml = nothing
If Not bXMLLoadError Then
// Load XML
set oXML = Server.CreateObject("Microsoft.XMLDOM")
oXML.Async = false
oXML.Load(oResponseXML)
// Load XSL
set oXSL = Server.CreateObject("Microsoft.XMLDOM")
oXSL.Async = False
'oXSL.Load(Server.MapPath("HotCourses.xsl"))
oXSL.Load(Server.MapPath("cdcatalog_ex3.xsl"))
// Transform
'Response.Write(oXML.transformNode(oXSL))
End If
information, though the page extension is missing. I retrieve the
information and write it to the screen. So far so good - However i cannot
format this information in anyway. A copy of the returned information saved
to my server results in the xml data being formatted and displayed as
intended! Can anyone explain to me why one would work but not the other.
Regards
Robert Egan
-- Code Below --
str_HC_url - variable formed from form information
xml.Open "GET", str_HC_url , false - line of code used - does not work
The above brings back info but cannot be formatted using code below.
Set xml = Server.CreateObject ("Microsoft.XMLHTTP")
xml.Open "GET", "http://www.accessburnley.co.uk/xml/asp/cdcatalog.xml" ,
false - alternate line of code - does work.
xml.Send
text = xml.ResponseText
If xml.Status = 200 Then
Set oResponseXML = xml.ResponseXML
bXMLLoadError = False
Else
Response.Write("<font color=""red"">Page Error: Could not load XML from
remote server</font><br>")
bXMLLoadError = True
End If
Set xml = nothing
If Not bXMLLoadError Then
// Load XML
set oXML = Server.CreateObject("Microsoft.XMLDOM")
oXML.Async = false
oXML.Load(oResponseXML)
// Load XSL
set oXSL = Server.CreateObject("Microsoft.XMLDOM")
oXSL.Async = False
'oXSL.Load(Server.MapPath("HotCourses.xsl"))
oXSL.Load(Server.MapPath("cdcatalog_ex3.xsl"))
// Transform
'Response.Write(oXML.transformNode(oXSL))
End If