You need to sign in to do that
Don't have an account?

how can we read xml from response
Hi,
I got a response this, here i want to read the data from the response.
can you please help me in this, can you give sample code for this.
How can we read the data from xml?
<?xml version="1.0" encoding="utf-16"?>
<Getmessage xms:xi="http://www.hello.com" xms:xd="http://www.hello.com">
<errorcode>2002</errorcode>
<errormessage>got error</errormessage>
</GetMessage>
I got a response this, here i want to read the data from the response.
can you please help me in this, can you give sample code for this.
How can we read the data from xml?
<?xml version="1.0" encoding="utf-16"?>
<Getmessage xms:xi="http://www.hello.com" xms:xd="http://www.hello.com">
<errorcode>2002</errorcode>
<errormessage>got error</errormessage>
</GetMessage>
Try this code to parse this xml response:
In errorCode and errorMessage string variable you will have your main xml tags content. This code is completely typed according to your xml response, using the same logic you can create a generic function to parse your other xml responses also.
Let me know, If it helps.
Regards,
Chandra Prakash