I am using Web API 2 to return some data serialized as XML using the XML MediaTypeFormatter. Is there any way for me to attach processing instructions to the response such as an xml-stylesheet directive? Right now when the client receives the data it is raw XML and not an XML document. I have tried setting UseXmlSerializer but it seems that only the DocumentElement is serialized- and that omits the processing instructions.
↧