Hi,
commonly this happens when there is some bugged Joomla plugin installed that breaks the Joomla javascript format.
Have a look at this FAQ to check the list of known bugged plugins:
http://storejextensions.org/faq/xml-sitemap-results-not-well-formatted.html
Another reason could be if the website uses mixed https protocol for backend/frontend as reported at this forum thread:
http://storejextensions.org/forum/view/10-jsitemap/3876-re-error-generating-sitemap.html
Let me know if you need additional help