data.php the XML PI is echoed before
plugins.php is required. This will generate a warning when others plugins try something like session_start or to set headers.
Please move this echo line to below the require_once statements. There must be no output before loading WP core.
May be also set PHP display_errors false to ensure the XML is not polluted with any warnings or errors coming from other plugins that should be irrelevant to producing the XML.