XML Serialization question
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Is it possible to save the contents of a Rich Text Box to an XML File, including bold text, italics, etc? If not, could someone suggest an alternative way to do it? Thanks in advance. -Sean
Yes, but probably not like you're thinking. You could save the value of the
RichTextBox.Rtf
property in a CDATA section of an XML document, but it won't convert the RTF to XML like Word can do; for that, it takes a good filter. You could save the RTF, open it in Word, and save it as HTML (which is actually XHTML - or an XML schema that looks like HTML) from Word. Word 2003 can also save XML in a different schema than XHTML. There are articles here on CodeProject that cover such topics.Microsoft MVP, Visual C# My Articles