Salesforce Certified Application Architect

Wednesday 30 March 2016

How to parse response (Getting from third party ) through DOM Parser in SFDC

The DOM (Document Object Model) represents an XML document as a hierarchy of nodes. Some nodes may be branch nodes and have child nodes, while others are leaf nodes with no children.
 
Here is the steps as listed under FYR :
1. Get DOM document
2. Get root Element
3. Get child Element
4. Get children

Example :
Integer Temp = 0;
for(integer i=0; i<=Temp; i++){
   
    Dom.Document docx = res.getBodyDocument();
    dom.XmlNode xroot = docx.getrootelement();
    dom.XmlNode [] xrrec = xroot.getChildElements();
   
    for(Dom.XMLNode child : xrrec){           
   
     for (dom.XmlNode awr : child.getchildren()){

        }
    }
}

Cheers ..

Salesforce Certified Application Architect & Certified Data Architecture and Management Designer Exam

How to pass Salesforce Certified Data Architecture and Management Designer Exam This exam was 1st architect exam for me. Its not that muc...