How to fix: XML Parsing Error: XML or text declaration not at start of entity

I noticed the following error message while checking RSS feeds belongs to a client.

XML Parsing Error: XML or text declaration not at start of entity
Location: http://www.domain.com/file.rss
Line Number 2, Column 1:
^

This is what the XML output:


Ron Weasley
8 yes

Notice the extra white line just before the ". That was the cause of the error message.
Remove the extra white line, you are ready to roll :-)



Ron Weasley
8 yes

This book might help: Professional XML (Programmer to Programmer)

Tagged with 
About sepedatua
I am nothing special, of this I am sure. I am a common man with common thoughts and I’ve led a common life. There are no monuments dedicated to me and my name will soon be forgotten, but I’ve loved another with all my heart and soul, and to me, this has always been enough.

This site uses Akismet to reduce spam. Learn how your comment data is processed.