Hi,
This is my first foray into xml and am stuck trying to read a node from an xml string.
I want to read the node called 'Url' but just keep getting
cant find node
any ideas welcome
asp
my xml looks like
This is my first foray into xml and am stuck trying to read a node from an xml string.
I want to read the node called 'Url' but just keep getting
cant find node
any ideas welcome
asp
Code:
Set xml = CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.LoadXml(objHTTP.responseText)
set node = xml.selectSingleNode("/QuotesResponse/QuotesResult/InsuranceCalculationResult/CustomerDetailsForm/Url")
if node is nothing then
response.write "Could not find Node"
else
response.write node.text
end if
set objDoc = nothing
my xml looks like
Code:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/envelope/"[/URL] xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema">[/URL]
<soap:Body>
<QuotesResponse xmlns="[URL unfurl="true"]http://www.somesite.com">[/URL]
<QuotesResult>
<InsuranceCalculationResult xmlns="[URL unfurl="true"]http://www.somesite.com">/webservices/">[/URL]
<CustomerDetailsForm>
<Url>[URL unfurl="true"]https://www.somesite.com/blahblah</Url>[/URL]
<DisplayText>Text</DisplayText>
</CustomerDetailsForm>
</InsuranceCalculationResult>
</QuotesResult>
</QuotesResponse>
</soap:Body>
</soap:Envelope>