Hello Everyone,
I got a work around of this problem. Instead of using a XmlTextWriter
, i tried using a StreamWriter(implementaion of a TextWriter).
The StreamWriter allows the use of <disable-output-escaping> and
thereby retaining the value
Now my Question is since i am handling huge amount of xml,
probably 50Mb-100Mb which writer is a better option and why?.
Abstracts from MSDN about both:-
The reason going to XMLTextwriter was that its was a forward-only way
of generating streams or files containing XML data and static (Shared
in Visual Basic) members are Mutlithreadsafe.
Regarding StreamWriter :
StreamWriter is designed for character output in a particular
Encoding, whereas classes derived from Stream are designed for byte
input and output.
Any public static (Shared in Visual Basic) members of this type are
safe for multithreaded operations
BUT By default, a StreamWriter is not thread safe.
Which one do you all recommend to use and if possible please write a
couple of lines why?.
Any insight will be of a great help. Thanks
Regards,
Pranay Jain.
pranaykumarjain@hotmail.com (Jain, Pranay Kumar) wrote in message news:<26df9a60.0402170743.39833ca1@posting.google. com>...[color=blue]
> Hello Everyone,
> I have written a simple app. that converts the dataset into
> excelspreadsheet.
> The App. uses the following architecture.
> First it generates the dataset with corresponding datatables(each
> datatable represents a worksheet).It uses an Xslt file to do the
> transformation of the xml (generate from dataset) and write the
> output xml into a xmltextwriter.
>
> The App converts the data into excel with almost all of the formatting
> as desired with exception of few.
>
> "In order to display a STRING VALUE into MULTIPLE ROWS WITH IN A CELL
> Excel uses a value
"
>
>
> I am aware that xmlTextWriter does not support <xsl:output> not it
> support <xsl: disable-output-escaping> tags and also that
> xmltextwriter converts invalid characters(&) to a valid xml
> characters(&) .
>
> I am using UTF-8 encoding specified in the xmltextwriter.
>
> This inbuilt behaviour is causing a formatting issue. As the
> resulting xml has this character escaped(&#10;) which is differnt
> from (
), the desired functionality is not achevied.
>
> Any work around is greatly appriciated.
>
> Regards,
> Pranay Jain.[/color]