XML Parse Error - Extra content at the end of the document XML Parse Error - Extra content at the end of the document xml xml

XML Parse Error - Extra content at the end of the document


XML can only have one "document entity" or "root", you're trying to use two (status and format). Wrap your two elements in a single one, so that your XML document only has one root element.

Bad

<?xml version="1.0"?><status>success</status><format>xml</format>

Good

<?xml version="1.0"?><response>  <status>success</status>  <format>xml</format></response>


Make sure you also triple check for a duplicate urlset declaration at the top of your document. This was my problem. It was a very careless oversight.

    <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9" url="http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">