Here under you can find a sample xml file of a customer of us. I know it isn't the best file you ever saw, but they can't change it for some reason.
Anyhow this is it:
I've written some vbscript to loop through the code, but I have the problem that I can't get to the nodetypedvalue for some reason. This is the sample code i've got.
Well I got the StartDate / EndDate etc, but I don't get any values returned? What I can do to get the values instead of the names?
Anyhow this is it:
Code:
<?xml version="1.0" encoding="UTF-8"?> <eExact> <method name="GetReport1"> <return name="Code">123456</return> <return name="Document"> <Attachment> <Name>WP501FOv1_1.pdf</Name> <BinaryData xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"> </BinaryData> </Attachment> </return> <return name="Startdate">01/01/2008 01:01</return> <return name="Enddate">01/01/2008 01:01</return> <return name="List2">0 of 1</return> </method> </eExact>
I've written some vbscript to loop through the code, but I have the problem that I can't get to the nodetypedvalue for some reason. This is the sample code i've got.
Code:
call xmlHttp.Open("GET", "http://localhost/GetReport1.xml")
call xmlHttp.Send()
if(Err <> 0) then
Response.Write("An error occured when retrieving data from an external source.<br />")
Response.Write(Err.Description)
Response.End
end if
on error goto 0
if(xmlHttp.status <> 200) then
Response.Write("The remote server returned an invalid statuscode: #8221;" & xmlHttp.status & " " & xmlHttp.statusText)
Response.End
end if
if xmlHttp.responseXML is nothing then
Response.Write("The remote server didn’t return xml content.")
Response.End
end if
set xmlDom = xmlHttp.responseXML
set nodeCol = xmlDom.documentElement.selectNodes("method/return")
for each oNode in nodeCol.Attributes
Response.Write(oNode.nodeTypedValue)
Next
Comment