Using XslCompiledTransform to perform 3 transformations to an XMLdocument

Posted on 2006-05-11
Last Modified: 2008-01-09
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
Question by:chrishorak

    Author Comment

    I've just found this article that seems to give me all I need:

    Accepted Solution

    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

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now