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
Certification PracticeCertification Practice 

Insert file obtained from REST API post call in XML

 How to insert the file related to a record in Salesforce which is in google drive?

I have successfully integrated the google drive and Salesforce and I am passing the Id of the file to get its metadata by using REST API Post call.

The response is in XML. Now I want to insert the file related to record in Salesforce.

Is this the correct way to do this? or there is any other approach to achieve this?

Any help would be highly appreciated.
ANUTEJANUTEJ (Salesforce Developers) 
Hi there,

I found the below thread that has an example for XML parsing that could be of help.

>>https://salesforce.stackexchange.com/questions/12442/xml-parsing-using-xmlstreamreader

I hope this helps and in case if this comes handy can you please choose this as best answer so that it can be used by others in the future.

Regards,
Anutej