Transform Result Doc as XDocument

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<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
 
Back
Top