If you ever faced this issue in the dynamic sitemap generated?
The error says Incorrect http header content-type: "application/json;charset=UTF-8" (expected: "application/xml")
This issue was caused by not setting the header content type properly. By default HTML page will return the text/html content type. In my case it was
| content-type | application/xhtml+xml |
you can verify this network tab in chrome and firefox,


