Usually, when it comes to xml, I write an xsd schema file and generate a C # class using xsd.exe. But it would be much easier to first declare C # classes (classes) with public properties, as necessary for serializing the XmlSerializer. Unfortunately, you are not getting any XML schema to document this output / interface. Generating an xsd schema from a generated XML file is quite error prone because you cannot guess the constraints or constraints. So what is the best way to generate xsd xml schema from dotnet class?
source share