Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSLT vs. C# opinions please

Status
Not open for further replies.

RickBeddoe

Programmer
Nov 18, 2008
32
US
I am somewhat new to XSL but I am a seasoned C# (not expert, mind you). I have been trying to get up to speed on XSL over the past week and I'm not sure I should continue pursuing this.

I currently have a project where I need to consolidate 5 XML documents (including a Schema) and several imported XML files into one report.

The other developers here have touted that XSL is the cat's meow for this kind of thing, but I'm not so sure. My experience using C# is that I can get at XML information much more directly and more specifically than I can with XSL and XPath. For example, I can simply use the C# GetAttribute method on a node to select a node rather than using a convoluted XPath declaration.

I would like to hear from anyone who has experience with C# (or Java for that matter) and XSL who could definitively say which is the better path to take. I understand the benefits of creating 'open' applications using XSL, XPath and even XQuery, but I need to get my work done and so far my impression is that it takes a lot more work in XSL to do what I can do in C#.

Thanks!
 
c# has found no xslt to measure against. xslt has found c# to measure against. c# may or may not have some implementation to support some version or functionality of xslt. xslt may or may not find some platform and engine to support some extension of it to call .cs during its execution. That summarizes their relative positioning in the technology space.
 
Missed "no" here.
... xslt has found [red]no[/red] c# to measure against...
 
C# does indeed have XSLT functionality in the form of System.XML. The advantages I've seen with C# so far are that programmatically, I have more power than I do in XSLT. At least, that is my perception.

It still requires knowledge of XPath (as I am finding out) and namespaces, but as I am familiar with C# syntax and structure, it is easier for me.

The meat of my original question is: Would I be better of learning XSLT or should I continue with C#?

 
>The meat of my original question is: Would I be better of learning XSLT or should I continue with C#?
The meat of my statement is: it is a wrong way of thinking trying to put c# and xslt in an opposite end, not at all. If you don't get it, let the time come. There is no use in forcing thing.
 
>C# does indeed have XSLT functionality in the form of System.XML.
So, does it support xslt 2.0? and that's what is consistent with my summary statement and that's how my summary is to be read.
 
thanks tsuji for your zen approach to this dilemma. It's advice that could go beyond this question.

 
I don't need xslt 2.0 support for this particular application. However, I do believe 2.0 is supported with the latest release of .NET.

Thanks again for your response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top