Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XML Serialization: serializing multiline strings?

0 views
Skip to first unread message

nick....@gmail.com

unread,
Sep 18, 2006, 4:01:33 PM9/18/06
to
Hi everyone,
I'm trying to serialize a multiline string (coming from a textbox), but
after deserializing it it removes the newlines. Is there a way to
instruct the deserializer on how to handle the formatting it comes
across?

Thanks,
Nick

glenn

unread,
Sep 19, 2006, 3:04:00 AM9/19/06
to
Nick

Try putting the data in a CDATA section.

HTH

Glenn
<nick....@gmail.com> wrote in message
news:1158609693.8...@m73g2000cwd.googlegroups.com...

nick....@gmail.com

unread,
Sep 19, 2006, 9:11:27 AM9/19/06
to
glenn wrote:
> Nick
>
> Try putting the data in a CDATA section.
>
> HTH
>
> Glenn

Alrighty, well since I read online that there was no way for the
XmlSerializer to write CDATA, I wrote it out with the XmlTextWriter.
The XML looks fine, the text is now wrapped in a CDATA element, but
using the stock deserializing, it doesn't pay attention to the newlines
in the CDATA.

Thanks for any help (thanks for your help already glenn),
Nick

nick....@gmail.com

unread,
Sep 19, 2006, 9:50:45 AM9/19/06
to

Nevermind, it is coming back with the newlines! Thanks again!

0 new messages