When using BCP to export data from a table to an XML file this works perfectly:
declare @cmd nvarchar(255); select @cmd = \' bcp "
declare @cmd nvarchar(255);
select @cmd = \' bcp "