function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ashok  45ashok 45 

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>
Shashi PatowaryShashi Patowary
Hi Ashok,

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