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)

No Comments

Leave a Reply

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