i have a peice of code that outputs many different XML files using the DataContractSerializer i would like to be able to output an XSL and XSD along with each one.
this is purely for learning purposes. Also I have not included any code as i think it is a fairly generic question.
the only way i have found to do this so far is by using the svcutil.exe. Is the datacontractserialiser able to do this at runtime?
(or is my understanding of the XSD and XSL incorrect?)
Having done a bit more reading i understand that the XSL needs to be defined for the XML not along with it and is something that needs to be done by me manually.
Edit: I have the Svcutil working i was however wondering if it was possible to do this in code. (ultimately i would like to place a copy of the XSD in the same place as the XML file)
You can extract the XSD from the DataContract
using svcutil.exe
svcutil.exe /dataContractOnly *.dll
Docu: http://msdn.microsoft.com/en-us/library/aa702581.aspx
Edit: To do this at runtime use the XsdDataContractExporter