Problem in accessing an XML Node which is retrieved using REST web service
Hi,
I am creating an application that gets the data with a REST call using "get url" function.I am passing some parameters
as query strings along with the REST URL.
I am able to get the response xml.But could not access the value of different nodes of that xml.
Below is my response xml,
<?
xml version="1.0" encoding="utf-8"?>
<ResponseArray
xmlns="urn:mdWebServiceAddress" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Version>
2.0.56</Version>
<TransmissionReference> </TransmissionReference>
<Results>
</Results>
<TotalRecords>
1</TotalRecords>
<Record>
<RecordID>
1</RecordID> <Results>AS01</Results>
</Record>
</ResponseArray>
Below is the code written,
mapvar = getUrl("https://xxx:",false);
stringdata = mapvar.get("responseText");
xmldata = stringdata.toXML();
strdata = xmldata.executeXPath("/ResponseArray");
input.Multi_Line = strdata;
I got the response xml correctly, but in the below line when i tried to access Response array node
strdata = xmldata.executeXPath("/ResponseArray");
No data is retrieved by executexpath and null data is stored in strdata.How to access that root node
"ResponseArray" ,
please help me in solving this problem