I use VB.net and the IXmlSerializable-interface for a some class with "difficult" xml-element. I made a basic class where I put all the magic and all xml-relevant class with some "difficult" xml-element inherited form these class.
During the "WriteXml"-method I do the magic for the difficult elements. (this works) And I also want to do "normal" staff for the "normal" xml-elements/-attribute. For that, i get over reflection all the properties with the right attributes. Simple attribute and element is no problem (WriteElementString(),..), but is the "normal" element a class and has xml-sub-elements, then I get a problem. How can I realize a normal serialization of xml-element in a WriteXml-method (in a basic class).
The real question is: How can I write in the XmlWrite-method a subelement (which has no ixmlserilization) of an actual element like the natural way. (these subelement have also subelements!)
Simple example:
<example>
<simpleelement>123</simpleelement>
<difficultelement>...magic </difficultelement>
<problemelement>
<simpleelement>123</simpleelement>
<simpleelement>123</simpleelement>
</problemelement>
</example>