XML to XML conversion

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The requirement is to convert an XML file from one format to another. What is
the best way to accomplish the same in C# 2.0? Coming from VB6 background, I
could think of the following:

1. Write C# code for the conversion
2. Write XSL for the conversion and invoke it from c#.

Which of the above is better in terms of Performance, Memory Consumption
etc. Are there other options available to achieve the same?
 
Hello!

Are you doing this on a regular basis, or is it a one-time transformation?

C# 2.0 contains a new set of optimized XSLT extensions, allowing for
extremely fast transformation of XML documents (highly recommended). XSLT is
a great approach because the XSLT transformation files are seperate from the
C# code and thus easy to build (and change).
 
I would definitely go with XSL. You never know how many formats your
document will need to be able to be tranformed to over the long haul.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
Thank you, Anders and Kevin. I shall take the XSL approach - especially
considering that it has been optimized for performance in .Net 2.0.
 
Back
Top