Wednesday, 26 March 2008

XSLT Transform in C# (a piece of cake)

Whilst there are times when I'd rather be rubbing Dorset Naga chillies in my eyes, most days I'm glad I develop in C# on the .Net framework. Take today for example. I needed to look into manipulating XML via XSLT; a powerful transformation language for XML. I thought it would take a while, around 3 hours; but with the powerful .Net library I had built a win forms app that takes XML input, XSLT input and outputs the transformation - all in under 30 mins! Long live .Net!

Below is the XSLT util class I created for anyone interested.

7 comments:

Anonymous said...

thanks!
I will be used it in my mobile applications.

Anonymous said...

I know it is also possible to create the XSLT, so you do not need to write it yourself. Do you know how?

David Conlisk said...

This is great, very useful. Thanks for sharing it!

Dave C said...

Exactly what i needed... Thanks chap.

Tony B said...

Great util, thanks a lot!

Aciprestes said...

The function receives string parameters. This may be a problem with huge xml files. Does anyone knows how to avoid string usage?

Oz said...

Thank you! Totally worked for me. It's exactly what I was looking for! God bless.