Currently, I have an xml file that looks like this...
<ArrayOfService>
<Service>
<Name>
Something
</Name>
<Id>
8003
</Id>
</Service>
</ArrayOfService>
This is automatically generated from a class that looks like this...
public class Service{
public string Name;
public int Id;
public Service(){
}
}
To turn the class into XML, I use...
XmlSerializer xs = new XmlSerializer( typeof(Service) );
xs.Serialize( context.Response.OutputStream, FunctionReturnsTypeService() );
Is there any way to also automatically generate an XSD like this?
EDIT:
Also, is there any way to add this schema to the xml as I'm serializing it?