1

So I have to write a HTML report that pulls information from various XML sources. I have the choice of using XSLT to generate the report or just write it in ASPX by serializing the XMLs into C# objects and using these objects to fill in the information in the aspx page.

Which alternative would be better in terms of development time and performance?

Otávio Décio
  • 73,752
  • 17
  • 161
  • 228
  • 2
    Interesting question, XSLT's great and purpose built for the job BUT can be thorny with a big learning curve. I guess it depends on how comfortable you are with either technology as that would have a large baring on development times. Interesting question though! – Luke Baughan Sep 26 '12 at 17:01
  • Technically I am very comfortable with either alternative. It feels that XSLT would be a cleaner and elegant solution but using code was raised as possibly better/easier. – Otávio Décio Sep 26 '12 at 17:04
  • One question you need to ask yourself and this will answer your question... Will you re-use the C# objects anywhere else? If not, well I think it's pretty obvious choice. – Steve Sep 26 '12 at 17:29
  • @Steve - Very unlikely. Plus we don't have real XSDs for the XML we are reading from. – Otávio Décio Sep 26 '12 at 17:31

1 Answers1

1

For me, a big part of the decision is whether the structure of the XML sources will change very often or if I will need to add/remove XML sources. With XSLT, you can just make the changes without having to recompile your code.

Glade Mellor
  • 1,326
  • 17
  • 10