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
Sitanshu ShuklaSitanshu Shukla 

I am currently working on converting few data into xml and downloading it but downloaded xml is not opening in browsers or in proper format. Please help me to identify this issue.

<apex:page controller="XmlData" contentType="application/xml/vnd.ms-excel#Report.xml"   cache="false" sidebar="false" showheader="false" >
{!xmlPage}    
</apex:page>
Best Answer chosen by Sitanshu Shukla
Sitanshu ShuklaSitanshu Shukla

Hello Everyone, 
I just put all the code in single line without breaking the line and it was working. 

<apex:page controller="XmlData" contentType="application/xml/vnd.ms-excel#Report.xml"   cache="false" sidebar="false" showheader="false" >{!xmlPage}</apex:page>

Thank You!!

All Answers

Raj VakatiRaj Vakati
Try this one 
 
<apex:page controller="XmlData" contentType="text/xml"   cache="false" sidebar="false" showheader="false" >
{!xmlPage}    
</apex:page>

 
Naveen KNNaveen KN
Yah, and also please share a sample of that format in case if you still face an issue. we can make as xml and test in our local machines.
 
Sitanshu ShuklaSitanshu Shukla

Hello Everyone, 
I just put all the code in single line without breaking the line and it was working. 

<apex:page controller="XmlData" contentType="application/xml/vnd.ms-excel#Report.xml"   cache="false" sidebar="false" showheader="false" >{!xmlPage}</apex:page>

Thank You!!

This was selected as the best answer