Last modified: 2014-05-08 15:19:36 UTC
Using API query with format=xml , a XML prolog is included in the results. When 'export' is enabled in the request, a XML prolog is included in the results. However if 'exportnowrap' is then enabled, the XML prolog is omitted. While the HTTP headers include the right information: Content-Type:text/xml; charset=utf-8 I think it is worth including the XML prolog to be consistent with other API calls that return XML. Bug 11959 is about a similar problem when using the front end Special:Export , which was wontfixed.
action=query&export=1&exportnowrap=1 just outputs whatever WikiExporter gives back. If you want the exported data to include the prolog, follow up on bug 11959. *** This bug has been marked as a duplicate of bug 11959 ***