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
JayantJayant 

Issue while rendering page as XML

I am trying to render the VF page as XML using contentType="application/xml#export.xml".

The issue is when the number of records I am converting to XML is small (<1000), the file is generated in 15-20 seconds but when the number of records increase to more than 1000, it simply can't load the document and I get the following messages - 

 

In Firefox - Firefox can't find the file at https://xxxxxx.visual.force.com/apex/DummyName?pId=a1BM0000000ApZ1.

 

In Chrome - No webpage was found for the web address: https://xxxxxxx.visual.force.com/apex/DummyName?pId=a1BM0000000ApZ1

 

I am not yet hitting the heap size or statements governor, still this message.

 

Has anyone tried a similar scenario before or has faced something like this ?

 

Your suggestions on a work around to create xml file out of SFDC data are most welcome.

 

Quick replies are most appreciated :).

Best Answer chosen by Jayant
JayantJayant
This was resolved by creating the xml in VF Mark-Up itself by having combinations of xml elements and merge fields rather than creating the xml in controller by appending xml elements and associated data and rendering the final string on VF page.