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
AbAb 

XML parsing in Salesforce

Hello,

How to send construct a XML request and display the response on a VF Page.
HTTP h = new HTTP();
HTTPRequest req = new HTTPRequest();
req.setEndpoint('https://servicesgateway.com/1/rest/searchByName');
Blob header = Blob.valueOf(UserId+ ':' + Password);
String authHeader = 'BASIC ' + EncodingUtil.base64Encode(header);
req.setHeader('Authorization', authHeader);
req.setMethod('GET');
HTTPResponse resp = req.send(req);
System.debug(res.getBody());

 
Best Answer chosen by Ab
Arunkumar RArunkumar R
Hi Sandrine,

You can have a look on the salesforce link.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_xml_dom.htm

This will helpful to you..!