I'm looking for options to convert C# to XML and also deserialize back to C# again. Anyone know of any existing solutions for this? I assume a Roslyn SyntaxTree is not Xml-serializable. I also assume making a xml-serializer for a syntaxtree would be quite a large undertaking. But maybee not?
Why do I need this? I want to generate code from an xml-model via xsl to syntaxtree-xml and then to c# (or maybee vb).
I don't want to generate C# directly from XSL (can be done but I don't feel it's ideal). I need XSL because I'm also going to generate XAML and HTML from the XML-model and I'd like to also be able to generate any code behind needed etc.
I know about T4-templates but right now I'm looking at other options for various reasons.