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
Shri RajShri Raj 

Can we render as XML Attachment in Salesforce? If we do, Can we Zip the Attachment?

Just like we generate a File using Apex, Can we render Data in an XML format? And also, Can we Zip the attachment? The reason is, Thats would we are supposed email the attachment to a Particular address. Therefore, 

1. Render data in an XML Attachment
2. Zip the attachment
3. Email the attachment. (I know we can do this) 

Thanks
Shri
AshwaniAshwani


1) Not 100% sure but if you set attrubute "Content-type" to "text/xml" is should treat page as xml.
2) You can not zip through apex. However javascript libraries can be used to zip file on visualforce page
3) You can do this.