Is this what you're after? http://www.yasserblog.com/2013/07/mvc-web-api-customized-xml-output.html
On Tue, Aug 18, 2015 at 7:56 AM, Greg Keogh <[email protected]> wrote: > Folks, in Web API when you sent an object back in the response it's > automatically serialized as JSON or XML depending upon the Accept header. > This is great, but I have to cheat the system slightly and send back > manually tweaked XML only if the XML serializer is "active". Rather than > look at the raw text of the request Accept headers, is there is more formal > way of knowing which serializer is "active" (if this means anything) -- > *GK* >
