A
Adam David Moss
All,
Long time since I've done some proper coding in ASP and I've hit a wee snag
that has got me baffled. Well two actually but the other is to do with
running pages under Sun ASP so we'll not go there! Anyway, I digress...
I've cobbled together some code as shown below (removed error checking etc
for simplicity). This uses ServerXMLHTTP to grab an XML file off a remote
server. When querying the result, however, the nodeValue property is null
whereas the nodeTypedValue property isn't.
Can anyone please advise as this I would expect nodeValue to be populated.
Cheers,
Adam M.
===== BEGIN_TESTPAGE.ASP ====
<%
Dim objXMLHTTP
Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
With objXMLHTTP
.open "GET", "http://www.myserver.eu/test.asp", False
.send
Response.Write "Status: " & .status & "<br />"
Response.Write "Parse:" & .responseXML.parseError.errorCode & "<br />"
Response.Write
..responseXML.documentElement.childNodes(0).childNodes(0).nodeTypedValue
Response.Write
..responseXML.documentElement.childNodes(0).childNodes(0).nodeValue
End With
Set objXMLHTTP = Nothing
%>
===== END_TESTPAGE.ASP =====
===== BEGIN_TEST.ASP =====
<% Option Explicit
With Response
.Buffer = True
.AddHeader "Pragma", "no-cache"
.CacheControl = "no-cache"
.Expires = -1
.ContentType = "text/xml"
.Charset = "UTF-8"
End With %><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tLRecords>
<tLRecord>
<tL>A</tL>
<tLD>B</tLD>
<tLED>2008-06-24</tLED>
<rL>C</rL>
<rLD>D</rLD>
</tLRecord>
</tLRecords>
===== END_TEST.ASP =====
Long time since I've done some proper coding in ASP and I've hit a wee snag
that has got me baffled. Well two actually but the other is to do with
running pages under Sun ASP so we'll not go there! Anyway, I digress...
I've cobbled together some code as shown below (removed error checking etc
for simplicity). This uses ServerXMLHTTP to grab an XML file off a remote
server. When querying the result, however, the nodeValue property is null
whereas the nodeTypedValue property isn't.
Can anyone please advise as this I would expect nodeValue to be populated.
Cheers,
Adam M.
===== BEGIN_TESTPAGE.ASP ====
<%
Dim objXMLHTTP
Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
With objXMLHTTP
.open "GET", "http://www.myserver.eu/test.asp", False
.send
Response.Write "Status: " & .status & "<br />"
Response.Write "Parse:" & .responseXML.parseError.errorCode & "<br />"
Response.Write
..responseXML.documentElement.childNodes(0).childNodes(0).nodeTypedValue
Response.Write
..responseXML.documentElement.childNodes(0).childNodes(0).nodeValue
End With
Set objXMLHTTP = Nothing
%>
===== END_TESTPAGE.ASP =====
===== BEGIN_TEST.ASP =====
<% Option Explicit
With Response
.Buffer = True
.AddHeader "Pragma", "no-cache"
.CacheControl = "no-cache"
.Expires = -1
.ContentType = "text/xml"
.Charset = "UTF-8"
End With %><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tLRecords>
<tLRecord>
<tL>A</tL>
<tLD>B</tLD>
<tLED>2008-06-24</tLED>
<rL>C</rL>
<rLD>D</rLD>
</tLRecord>
</tLRecords>
===== END_TEST.ASP =====