Copied from http://stackoverflow.com/questions/1461029/possible-to-add-a-xslt-stylesheet-to-a-serialized-xml-document
XmlSerializer s = new XmlSerializer(typeof(myObj));
using (XmlWriter w = XmlWriter.Create(@"c:\test.xml"))
{
w.WriteProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"USED-FILE.xsl\"");
s.Serialize(w, myObj);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment