C# XmlSerialization: Adding a wrapper



I am changing the approach of serializing data inside my application. Until now I did everything manually, which created a lot of code, but also granted me a lot of flexibility.


Now I am using the XmlSerializer, and created a DataTransferModel in order to provide the data in the way I want.


The only thing that is getting in my way now is that I need to have a wrapper around the XML-Content. It is just an other tag containing the name of the application. How can I add this tag around the XML-Documents created inside the application?


Thanks and if you need more information do not hestiate to ask.


EDIT: The tag should be the first tag in the document.


No comments:

Post a Comment