I am calling SQL Query through Execute SQL Task
FOR XML RAW('Facility'),Root('Extract'),Elements
and assigning the result set (XML) to a variable(Data) of String Datatype. After SQL Task I am using Script Task and reading variable (Data) and has some C# in it.
StreamWriter outfile = new StreamWriter(@"C:\Output.xml");
when I execute the package, XML file is created but when i open the file, XML is not formed correctly and I am getting error
" End element was missing the character '>'. Error processing resource 'file "
But the same query was successful when i run in SSMS.
Please help me.
Thanks in Advance
View Complete Post