am trying to write text to an XML-File using the XMLSerializer. The text(String)-function escapes characters automatically.
Is it possible not to escape text when adding it to the xml-File?
If it is not possible, could you recommend an easy workaround without having to rewrite all of my XML creation code?
Thanks
You probably moved along and found your own solution in the meantime but here is a possible solution. Rather than using the serializer, I directly call the underlying StringWriter to insert raw text (in my case that is well formed xml, so I want to avoid escaping the <,> marks). Notice the serializer flush is very important to get the correct order.