All,
I have a list of objects which I have serialized to an XML document using XmlSerializer.
However I would like to wrap the whole result into two tags:
<message>
<!-My Serialized content goes here-->
</message>
Do I need to open it as an XML Document and Add a new root element or is there another way of doing it ?
Rgds,
MK
XmlSerializer writes to an XmlWriter. Write the start tag to the writer first, then serialize, and close your message tag at the end.
Example: