EDN Admin
Well-known member
<pre class="prettyprint XPathDocument xpathDoc = new XPathDocument(sourcePath);
XPathDocument xpathTransform = new XPathDocument(XmlReader.Create(assembly.GetManifestResourceStream("Namespace.Stylesheet.xsl")));
XslCompiledTransform trans = new XslCompiledTransform();
trans.Load(xpathTransform);
trans.Transform(xpathDoc, writer);[/code]
How do you output an XDocument from a transform?
The above code sends the output to an XmlTextWriter. But, I need the output as an XDocument or, at least, an XmlDocument.
View the full article
XPathDocument xpathTransform = new XPathDocument(XmlReader.Create(assembly.GetManifestResourceStream("Namespace.Stylesheet.xsl")));
XslCompiledTransform trans = new XslCompiledTransform();
trans.Load(xpathTransform);
trans.Transform(xpathDoc, writer);[/code]
How do you output an XDocument from a transform?
The above code sends the output to an XmlTextWriter. But, I need the output as an XDocument or, at least, an XmlDocument.
View the full article