1
votes

I am looking for the best method of parsing the actual EDIFACT directory files from the UNECE website.

I have managed to write one for the 12A directory using C#, but for older directories such as 96A/B (HTML) and 99A/B (TEXT) it is proving too difficult and time consuming to write a universal parser without having to code version specific rules by checking the file extension to determine which parser needs to be used.

My question is there any parsing library (.NET only) in existence where I can specify how certain files should be parsed/transformed to a different format?

To re-clarify I am not looking to process actual EDIFACT data files, but the source directories themselves.

3
Your question is far too broad, unless it's actually "Do have to do A or B?", in which case you've answered it yourself by "categorically ruling out B", which leaves only A. We can't tell you the "best" anything. If you're asking for a library or tool recommendation, the question is off-topic here according to the help center. If you're asking something else, it's not clear from your question. In addition, this appears to be a duplicate of Is there a really simple way to process EDIFACT for example D96A?.Ken White
@KenWhite I will rephrase my question and clarify what I am looking for.Intrepid
Your rephrased question is off-topic (as I previously indicated). Questions asking us to find or recommend tools, libraries, or favorite off-site resources are off-topic at StackOverflow. Once again, see the help center (specifically item #5 in the numbered list on that page).Ken White

3 Answers

1
votes

Check out smooks. The have some code somewhere that parses all of these. I don't remember the exact location of the code however.

1
votes

I found this project which has all the directories in XML format (see the data directory) https://code.google.com/p/izi-sandbox/source/browse/trunk/php/php_edi/

I use it for a dumb interpreter based on my parser https://github.com/sabas/edifact

0
votes

This won't be pretty (and may not be free), but look at the Dictionary Viewer from Liaison. You can export the dictionary to HTML, parse the HTML into something you like and go from there.