arbejde med webservice response i javascript
hejsajeg har en webservice som returnere følgende:
<?xml version="1.0" encoding="utf-8" ?>
- <AccountResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<ContractTime>300</ContractTime>
<TimeAccumulated>33</TimeAccumulated>
</AccountResponse>
Hvordan skal jeg rette min javascript til for at kunne hente disse værdier fra mig xml svar??
if ((oXmlHTTP.responseXML.xml) != null && (oXmlHTTP.responseXML.xml.toString().length > 0)){
oContractTime.DataValue = oXmlHTTP.responseXML.selectSingleNode("ContractTime").text;
oTimeAcc.DataValue = oXmlHTTP.responseXML.selectSingleNode("TimeAccumulated").text;
}
