Is there a way to control/tweak xml declaration while serializing an object using attributes in the class.
In other words I am searching for attribute(s) in C# that can be used to decorate my class and will help in tweaking the xml declaration part(attributes in it) while serializing an object of that class. I know that there is a class XmlDeclaration that can be used to achieve it, however I want to achieve the same result using attributes, which I think is cleaner as different processing instruction stays with the POCO classes and which can be varied across different POCO classes.
Kindly let me know if there is any out-of-the-box feature/custom solution for that or this is just another stupid question... :)