Is there an easy (single call) way in .NET to write an XmlElement to a XmlTextWriter where that element is written out in full to the output?
Where the XmlElement may have many child elements and they have children, etc. And where it explicitly adds namespaces as needed.
I think the WriteTo
method on XmlNode
(a base class of XmlElement
) can do what you want.
For the issue about namespaces I think you would better add some samples of input/output or where your current approach fails.