Xml serialization/deserealization and html character encoding
<p>I am doing serialization of xml into objects and visa versa using the .NET XmlSerializer. The xml contains encoded special characters, such as greater then and/or less then symbols. When the xml is serialized into objects, I need those greater/less then symbols to be be actually converted to "&lt;" or ">" and when going from object to xml, I need the actual "&lt;" or ">" to be converted into their encoded versions.</p>

<p>I have a couple of work around/hacks in the UI which do the conversion, but  I am looking for a better way to handle this. I was hoping there would be some parameter setting in the actual serializer that would do this when I serialize/deserealize. I looked around and played with various writers/steams that get passed to the serializer, but could not find anything.</p>

<p>Anyone know what is the best solution for this?</p>