Transform Result Doc as XDocument

Discussion in 'Database, XML and Reporting' started by DN Admin, Apr 27, 2012.

  1. DN Admin

    Staff Member

    United States
    Aug 7, 2010
    Joliet, IL U.S.A.

    <pre class="prettyprint XPathDocument xpathDoc = new XPathDocument(sourcePath);
    XPathDocument xpathTransform = new XPathDocument(XmlReader.Create(assembly.GetManifestResourceStream("Namespace.Stylesheet.xsl")));
    XslCompiledTransform trans = new XslCompiledTransform();
    trans.Transform(xpathDoc, writer);</pre>
    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

Share This Page