Add Stylesheet reference to XML Document in Linq?
问题 I create an XML Doc and wanted have a reference to the XSLT file. //<?xml-stylesheet type="text/xsl" href="OBReport.xslt"?> to this XML generation: XElement xml = new XElement("ReportedOn", from dl in EL.DocumentLog.ToList() join o in EL.Organization on dl.OrganizationID equals o.OrganizationId where dl.ActionDate >= stDate & dl.ActionDate <= enDate orderby dl.DefendantName, dl.DocumentName select new XElement("persons", new XAttribute("documentName", dl.DocumentName), new XElement(