XQuery in C# or ASP.NET

  • Thread starter Thread starter jelle79
  • Start date Start date
J

jelle79

Hi,

What is a nice, free and fast XQuery library for .NET?

I've seen AltovaXML and Saxon. Are there more? And which is the best?

Does someone has some experience?


Thanks.


Greetings,
Jelle
 
What is a nice, free and fast XQuery library for .NET?

I've seen AltovaXML and Saxon. Are there more?

I don't know of any other.
And which is the best?


Saxon is mostly developed in Java and then cross compiled to .NET. That
way it is all managed code.
AltovaXML I think is a COM solution usable in .NET via COM interop.

I have mainly used Saxon for doing XSLT 2.0 not XQuery so I am not in a
position to judge which is the best XQuery library.
 
Hi,

What is a nice, free and fast XQuery library for .NET?

I've seen AltovaXML and Saxon. Are there more? And which is the best?

I don't know any other XQuery implementations for .NET.

As noted by Martin, Altova actually provides COM components, not
native .NET. This is less convenient and may potentially impact
performance. It also means that you need full trust for your apps, as
they invoke unmanaged code. In contrast, Saxon is fully managed (it's
written in Java and cross-compiled for .NET using IKVM).

Also, as far as I know, Saxon performs significantly better
optimizations than Altova (for both XQuery and XSLT, as the engine is
the same for both). However, I'm not sure how much that applies to the
free Saxon-B, as quite a few particularly advantageous optimizations
(such as join optimizer) are only available in commercial Saxon-SA.

One other thing that is nice about Saxon is that it provides you with
full access to .NET class library from within XQuery. Writing
extension fuctions is a breeze, and quite often you don't even need to
bother, as you can just use the standard classes directly. I once
wrote an XQuery module that had two inputs - one was XML (obviously),
another was a set of .NET assemblies which was analyzed using
reflection; the output was plain text (generated code), using Saxon.
It ended up being pure XQuery, and I found interop to be very easy to
work with and quite a time saver.
 
Thanks! I will try Saxon-B.


Jelle



Hi,

What is a nice, free and fast XQuery library for .NET?

I've seen AltovaXML and Saxon. Are there more? And which is the best?

I don't know any other XQuery implementations for .NET.

As noted by Martin, Altova actually provides COM components, not
native .NET. This is less convenient and may potentially impact
performance. It also means that you need full trust for your apps, as
they invoke unmanaged code. In contrast, Saxon is fully managed (it's
written in Java and cross-compiled for .NET using IKVM).

Also, as far as I know, Saxon performs significantly better
optimizations than Altova (for both XQuery and XSLT, as the engine is
the same for both). However, I'm not sure how much that applies to the
free Saxon-B, as quite a few particularly advantageous optimizations
(such as join optimizer) are only available in commercial Saxon-SA.

One other thing that is nice about Saxon is that it provides you with
full access to .NET class library from within XQuery. Writing
extension fuctions is a breeze, and quite often you don't even need to
bother, as you can just use the standard classes directly. I once
wrote an XQuery module that had two inputs - one was XML (obviously),
another was a set of .NET assemblies which was analyzed using
reflection; the output was plain text (generated code), using Saxon.
It ended up being pure XQuery, and I found interop to be very easy to
work with and quite a time saver.
 
Back
Top