Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 799
  • Last Modified:

Using XslCompiledTransform to perform 3 transformations to an XMLdocument

I have some code where I create an XML document (XMLDocument) and then I need to transform that document based on various criteria. I may need to transform that single XML document 3 or 4 times, using 3 or 4 different .xslt files

What is the best way to go about it using the Transform method from the XslCompiledTransform class?

Do I need to output the result to a temporary file to disk everytime and then load that again when I need to do the next transformation, or can i do it all in memory on the XML document I already have loaded?

I will also be using XsltArgumentList to pass arguments into my xslt

So i assume that i will use one or a combination of the following:

XslCompiledTransform.Transform (IXPathNavigable, XsltArgumentList, Stream)
XslCompiledTransform.Transform (IXPathNavigable, XsltArgumentList, TextWriter)
XslCompiledTransform.Transform (IXPathNavigable, XsltArgumentList, XmlWriter)

Any help would be appreciated.

Thanks Chris
1 Solution
chrishorakAuthor Commented:
I've just found this article that seems to give me all I need:

Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now