Convert a XML string created by Silverlight 4 richtextbox to plain text

lambertspider

New Member
I have a richtextbox in my application. I am storing its content in the database. When I retrieve the contents from the database I get an XMl string something like this: \[code\]<Section xml:space="preserve" HasTrailingParagraphBreakOnPaste="False" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> ...................\[/code\]I want to convert this string back to plain text and bind it to the text property of the textblock. \[code\]XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(description); StringWriter sw = new StringWriter(); XmlTextWriter tx = new XmlTextWriter(sw); xmlDoc.WriteTo(tx); string str = sw.ToString();// return str;\[/code\]But this is just giving me the same XML.Please let me know where am I missing.
 
Back
Top