Yep, it's certainly possible. Here's how I did this for exporting my whole Site-Tree to XML (also for reading into flash):
1) Go to your template folder and create a new folder called "export" or similar. This is purely for organizing your templates... if you plan to output your site as regular HTML-site for people without Flash, then this is going to help you keeping your templates structured.
2) Think about a good prefix for your templates. We don't want to mess with the default SilverStripe templating mechanisms, so we're going to prefix all our templates. In this example, I chose Export as the prefix.
3) On your Page class, create a function like this:
/**
* Render the page for export
* @return string
*/
public function ExportContent(){
$viewer = new SSViewer(array('Export' . $this->ClassName, 'ExportPage'));
return $viewer->process($this);
}
As you can see, I'm using the 'Export' prefix here to render the page with a custom template. This function works for all subclasses of page as well. First the export will always use Export + <ClassName>, if that template doesn't exist, it will fall back to ExportPage
4) Obviously we need a matching template now.. create a new File called ExportPage.ss in the templates/export folder. This file should only contain the stuff needed to export the data of a page. Do not put HTML Headers and stuff there. Here's an example of such a file:
<div>
<h1>$Title</h1>
$Content
<% if Children %>
<div class="children">
<% control Children %>
$ExportContent
<% end_control %>
</div>
<% end_if %>
</div>
The interesting bit here is the call to $ExportContent, which is basically going to call the ExportContent function of all children, thus rendering their content out as well. Of course you can fully customize the template.. just don't forget to export the contents of the children as well.
5) Now we're basically set. All we need to add is an entry point to our export. We do this, by creating a function on the Page_Controller class. The method looks like this:
public function export(){
return array();
}
Now you just need a template for this method. In your templates folder, create a file named Page_export.ss. This file can then contain all the HTML Headers and footers and should contain something like this:
<!-- HTML Headers and stuff here -->
<% control Menu(1) %>
$ExportContent
<% end_control %>
<!-- HTML Footer... -->
This gets the level 1 SiteTree objects and exports their content...
6) You're set and ready to go. Just open yoursite.com/somepage/export in your browser and it will export the whole SiteTree as one HTML file (maybe you'll have to add ?flush=1 to the URL the first time you do the export).
Hope that helps.
Update: If you need different export templates for different types of pages, this is not a problem at all. E.g. you have a page class named TestimonialPage and need it to export differently than regular pages, then just create a template named ExportTestimonialPage.ss in templates/export and fill it with the desired template code...