Jump to content

Transform Result Doc as XDocument

- - - - -

  • Please log in to reply
No replies to this topic

#1
AWS

AWS

    Administrator

  • Administrators
  • 54,004 posts
  • LocationJoliet, IL U.S.A.

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);

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users