When using XmlSerializer, I notice that it does not normalize the
single quote and double quote characters, i.e. does not change ' to
' and " to ". However, it does normalize other characters,
like changing ampersand to &
Here is my code:
---- start of code --------
MyClass *myClass = MyClass() ;
XmlSerializer *xs = new XmlSerializer( __typeof( MyClass ) ) ;
StringWriter *sw = new StringWriter() ;
xs->Serialize( sw, myClass ) ;
String xmlResult = sw->ToString() ;
---- end of code --------
Is this a inherent property of XmlSerializer that cannot be changed?
If the answer is yes, is there other .Net classes that will provide
normalization for single and double quotes? Thanks.