views:

453

answers:

6

Hi

We're looking for a Transformation library or engine which can read any input (EDIfact files, CSV, XML, stuff like that. So files (or webservices results) that contain data which must be transformed to a known business object structure.) This data should be transformed this to a existing business object using custom rules. XSLT is both to complex (to learn) and to simple (not enough features) Can anybody recommend a C# library or engine? I have seen Altova MapForce but would like something I can send out to dozens of people who will build / design their own transformations without having to pay dozens of Altova licenses.

A: 

@Edosoft,

could you provide an example scenario? it's not clear what is "any input".

aku
/agreed "Any input" means that I can send a PNG file? ;)
Martín Marconcini
question clarified
edosoft
A: 

Microsoft BizTalk Server does a very good job of this.

John Hunter
+1  A: 

I wouldn't be so quick to dismiss XSLT as being too complex or not contain the features you require.

There are plenty of books/websites out there that describe everything you need to know about XSLT. Yes, there is a bit of a learning curve but it doesn't take much to get into it, and there's always a great community like stackoverflow to turn to if you need help ;-)

As for lack of features you can always extend xslt and call .NET assemblies from the xslt using the XsltArgumentList.AddExtensionObject() method, which would give you the power you need.

MSDN has a great example of using this here

It's true that the MapForce and Biztalk applications make creating xslt very easy but they also cost a bit. Also, depending on your user base (assuming non developers), I think you'll find that these applications have there own learning curves and are often too feature rich for what you need.

I'd recommend you to consider building and distributing your own custom mapping tool specific to your users needs.

Also if you need a library to assist with file conversions I'd recommend FileHelpers at SourceForge

brodie
Thanks for the FileHelpers link! rep++
edosoft
+3  A: 

If you think that XSLT is too difficult for you, I think you can try LINQ to XML for parsing XML files. It is integrated in the .NET framework, and you can use C# (or, if you use VB.NET 9.0, better because of the XML literals) instead of learning another language. You can integrate it with the existing application without much effort and withouth the paradigm mismatch between the language and the file management that occurs with XSLT.

Microsoft LINQ to XML

Sure, it's not a framework or library for parsing files, but neither XSLT is, so...

Bye.

volothamp
+2  A: 

XSLT is not going to work for EDI and CSV. If you want a completely generic transformation engine, you might have to shell out some cash. I have used Symphonia for dealing with EDI, and it worked, but it is not free.

The thing is the problem you are describing sounds "enterprisey" (I am sure nobody uses EDI for fun), so there's no open source/free tooling for dealing with this stuff.

Heh, funny how these things work out. I'm one of the developers of Symphonia and related tools.If anyone is interested, feel free to contact me.
Jonathan Wright
A: 

DataDirect Technologies has a product that does exactly this. At http://www.xmlconverters.com/ there is a library called XmlConverters which converts EDI to XML and vice-versa. There are also converters for CSV, JSON, and other formats. The libraries are available as 100% .net managed code, and a parallel port in 100% Java. The .net side supports XmlReader and XmlWriter, while the Java side supports SAX, StAX and DOM. Both also support stream and reader/writer I/O. DataDirect also has an XQuery engine optimized for merging relational data with EDI and XML, but it is Java only.

lavinio