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
Paras JainParas Jain 

how to read xml and fetch id(123456) and store this in my account object record

<abc><frokeId>123456</frokeId></abc>

 
Srinivas SSrinivas S
String myXML = '<abc><frokeId>123456</frokeId></abc>';
Dom.Document domDoc = new Dom.Document();
domDoc.load(myXML);
Dom.XMLNode rootNode = domDoc.getRootElement();
for(Dom.XMLNode child1 : rootNode.getChildElements()) {
	system.debug(child1.getText());
}

Please follow as specified. I have test by executing the above code in developer console > anonymous block, it is working.

------------
Thanks,
Srinivas
- Please mark as solution if your problem is resolved.