I have a strange requirement where an application consuming some XML that my application is generating actually needs empty elements to be serialized as parent elements. For example:
<element foo="bar" />
should be:
<element foo="bar"></element>
I'm not aware of any way that the XmlSerializer allows you to change this. Does anybody know how to accomplish this?