Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Serialize an object into an xml element and add to an XmlDocument

$
0
0

I am manually building an XmlDocument for which I have a specific XmlElement that I want to append several similar children into. The children are generic objects of type T so I can't manually build the the hierarchy as I don't know the fields.

I need to serialize those class instances automatically.

The only way I know is to create a complete document and import then append but that leaves each child decorated with root level schema attributes. How can I perform such a task so each serialized class instance from the collection inserts without the document declarations?

Thanks.


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>