Title: create xml page for flash
Last modified: August 19, 2016

---

# create xml page for flash

 *  [michaeldfoley](https://wordpress.org/support/users/michaeldfoley/)
 * (@michaeldfoley)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/create-xml-page-for-flash/)
 * Hi,
 * I’ve been wracking my brain about this and just can’t figure it out. I am trying
   to create a page template that will display the page content as xml to use in
   a flash file. I created a template that outputs valid xml. For some reason the
   page works in Safari but not in Firefox. In Firefox it returns an undefined in
   the flash file. Any ideas on what I can do to solve this issue? Below is the 
   code I am using for the template.
 *     ```
       <?php
       /*
       Template Name: XML
       */
       require('wp-blog-header.php');
   
       header('Content-Type: text/xml');
   
       echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
   
        if(have_posts()) : ?><?php while(have_posts()) : the_post() ?>
   
                               <?php the_content(); ?>
   
                       <?php endwhile; ?>
   
                       <?php endif; ?>
       ```
   
 * Thanks for your help

Viewing 1 replies (of 1 total)

 *  [Eric Mann](https://wordpress.org/support/users/ericmann/)
 * (@ericmann)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/create-xml-page-for-flash/#post-1169522)
 * First of all, that won’t export a well-formed XML file. You’re not creating any
   valid XML entries … just a dump of the website with the <?xml …> tag at the top.
 * Second, where are you putting this XML file? Is it just a php file that renders
   as XML or are you storing an XML file on the server? Either way, I’d also want
   to see the code you’re trying to use to call the file.
 * Also, is Firefox giving you a specific error?

Viewing 1 replies (of 1 total)

The topic ‘create xml page for flash’ is closed to new replies.

## Tags

 * [Firefox](https://wordpress.org/support/topic-tag/firefox/)
 * [flash](https://wordpress.org/support/topic-tag/flash/)
 * [mozilla](https://wordpress.org/support/topic-tag/mozilla/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [template](https://wordpress.org/support/topic-tag/template/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Eric Mann](https://wordpress.org/support/users/ericmann/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/create-xml-page-for-flash/#post-1169522)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
