I have an API call which returns a XML string, I have converted that response with new SimpleXmlElement so that it returns me a XML object. Below is the result
SimpleXMLElement Object
(
[0] => <root>
<PINCODELIST>
<PINCODE>152001</PINCODE>
<CITYNAME>GURDASPUR</CITYNAME>
<ACTIVEFLAG>Y</ACTIVEFLAG>
<EDIT_DATE>09 May 2015 10:47:20</EDIT_DATE>
<ROUTINGCODE>N/PB/1026/FRZPR</ROUTINGCODE>
</PINCODELIST>
</root>
)
How do I access each element in root tag assuming it can have X number of PINCODELIST tags.
I tried $res[0]->root but it gaves me SimpleXMLElement Object ( )
Any ideas ?
0 comments:
Post a Comment