.net - How to add xsl stylesheet node to XML produced by XmlSerializer? -
I have a WCF REST service that returns an ordered object with XmlSerializer. How can I add xls stylesheet information (like the following) to output received by the WCF service?
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;? Xml-stylesheet type = "text / xsl" href = "conversion / customer.xl"? & Gt; & Lt; Customers & gt; & Lt; Name & gt; Foo & lt; / Name & gt; & Lt; / Customer & gt; My current operation:
[Operation Contract, XML Serializer Formatt] [WebGet (EurTemplate = "{ID}")] GetById Customer (String ID); To control the stylesheet context, what do I like to be able to do:
[OperationContract, XMLSeller's Formats] [XslStylesheet (Href = "Convert / Customer. XSL ")] [WebGet (UriTemplate =" {id} ")] GetById customer (string ID);
A describes how to implement the [IncludeXmlDeclaration] attribute. You should have something similar to your XslStylesheet feature
Comments
Post a Comment