XML to XML conversion

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim

    XML to XML conversion

    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?
  • Anders Borum

    #2
    Re: XML to XML conversion

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

    --
    Venlig hilsen
    Anders Borum / SphereWorks
    Microsoft Certified Professional (.NET MCP)


    Comment

    • Kevin Spencer

      #3
      Re: XML to XML conversion

      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.

      "Tim" <Tim@discussion s.microsoft.com > wrote in message
      news:AAEFAA97-5834-46C4-9877-23F2AB3C9253@mi crosoft.com...[color=blue]
      > 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?[/color]


      Comment

      • Tim

        #4
        Re: XML to XML conversion

        Thank you, Anders and Kevin. I shall take the XSL approach - especially
        considering that it has been optimized for performance in .Net 2.0.

        "Kevin Spencer" wrote:
        [color=blue]
        > 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.
        >
        > "Tim" <Tim@discussion s.microsoft.com > wrote in message
        > news:AAEFAA97-5834-46C4-9877-23F2AB3C9253@mi crosoft.com...[color=green]
        > > 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?[/color]
        >
        >
        >[/color]

        Comment

        Working...