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

How can we read XML from response?
Hi ,
I got confused while reading a XML response using DOM. Can you please help me in this. here am posting my response.
<?xml version="1.0" encoding="utf-8"?>
<Global xmlns:xsi="http://www.heelo.com" xmlns:xsd="http://www.yahoo.com">
<Successful>false</Successful>
<restrictone>
<restrictFilter>
<errormessage>error</errormessage>
<code>2002</code>
<candidate>Ashok</candidate>
<topFilters>
<SubFilter>
<Subtype>WWE</Subtype>
</SubFilter>
</topFilters>
</restrictFilter>
</restrictone>
</Global>
I got confused while reading a XML response using DOM. Can you please help me in this. here am posting my response.
<?xml version="1.0" encoding="utf-8"?>
<Global xmlns:xsi="http://www.heelo.com" xmlns:xsd="http://www.yahoo.com">
<Successful>false</Successful>
<restrictone>
<restrictFilter>
<errormessage>error</errormessage>
<code>2002</code>
<candidate>Ashok</candidate>
<topFilters>
<SubFilter>
<Subtype>WWE</Subtype>
</SubFilter>
</topFilters>
</restrictFilter>
</restrictone>
</Global>
You can use XMLstreamreader class to parse this XML.Please find more about this at -
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_xml_XmlStream_reader.htm
Please let me know if this is helpful.
regards,
Shashi