+ 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) 


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.