As a last resort, you could try removing the space with a plugin attached to OnWebPagePrerender. If it doesn't work, it means the space isn't coming from MODX or the sitemap plugin, in which case auto-
-file is a more likely culprit.
This code in the plugin should do it:
$modx->resource->_output = ltrim($modx->resource->_output);
return'';
If that works, you might want to restrict execution to just the sitemap resource like this:
if ($modx->resource->get('id') == 12) { // Change to ID of your sitemap resource
$modx->resource->_output = ltrim($modx->resource->_output);
}
return'';
[ed. note: BobRay last edited this post 7 years, 2 months ago.]