Your xml document starts with a new-line.
2024 update
I hope this solved your issue back in 2013. For those finding this question and answer today, the typical reason for an extra newline to appear at the start of the output of a PHP script (whether that was an XML file, RSS feed or HTML page), the common cause for this often 1 specific reason:
One of your PHP files, whether it's one you wrote or any PHP file you included via composer ends with a ?>
with an extra newline. (?>\n\n
)
Most modern PHP style guides will recommend against using the closing ?>
for this very reason. Anything outside of <?php
and ?>
becomes output to the browser/HTTP client, and while it's easy to spot a <?php
starting on line 2, a ?>
with some extra lines at the bottom of the file is easy to miss.
Any lines outside of <?php
and ?>
gets echoed straight to the client and runs before any functions or classes you've defined unless you started 'output buffering' before including any file.
This is also the number one cause for the common headers already sent error.
Your files should not end with ?>
. If you do this, remove them. If you did, then the cause of this issue is one of your dependencies/plugins.