GlobalConfiguration.Configuration.Formatters.Clear();
GlobalConfiguration.Configuration.Formatters.Add(
new System.Net.Http.Formatting.XmlMediaTypeFormatter());
The XmlMediaTypeFormatter uses the DataContractSerializer by default. To use the XmlSerializer instead, add the following line:
GlobalConfiguration.Configuration.Formatters.XmlFormatter.UseXmlSerializer = true;
No comments:
Post a Comment