I am getting a response from a web service call in XML format. I want to search for the status string in the XML response and proceed further depending on its value. How can I do this? The response is below:
<META NAME="ColdFusionMXEdition" CONTENT="ColdFusion DevNet Edition - Not for Production Use."><?xml version="1.0" encoding="UTF-8"?>
<ParticipantService>
<Response>
<student_id>10082</student_id>
</Response>
<RequestStatus>
<Code>1</Code>
<Status>SUCCESS</Status>
<Message>Valid Credentials.</Message>
</RequestStatus>
</ParticipantService>
You can use NSXmlParser. If you are checking only for status you can do some string manipulation as follows,