I have used xslt 2.0 using saxon to convert a raw xml to multiple xml outputs.
first i used <xsl:result-document href"$file"> to generate files.
But later i used <xsl:message> so the o/p will be generated in the console and not stored as a file.
What my question i want capture this output from console and assign it to a string without creating a file. How do iachieve it
MemoryStream Stream = new MemoryStream();
string Output = System.Text.Encoding.ASCII.GetString(Stream.ToArray());
when i gave this it is only storing "<?xml version="1.0" encoding="utf-8"?>"
 
even tried to implement the solution given here http://discuss.joelonsoftware.com/default.asp?dotnet.12.310872.6[^]
 
i got this error " data at the root leve is invalid line 1 position 1