Parsing EDIFACT can be a daunting undertaking. Is there any good open source library that can help?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
www.smooks.org - A template-based text parser. They have suitable EDI examples that I was looking to use to implement for Walmart 810s before they dumped my products.
Parsing EDIFACT is easy. You can find many libraries to do it. For example,
http://code.google.com/p/edicoder/
All these libraries simply break up the messages into segments.
The hard part with EDIFACT is to transform the message into some meaningful objects. This is very application specific and I doubt you will find any libraries. Even if you find one, it will be specific to a narrow field, like hotel reservation.
There is a good one at http://x12parser.codeplex.com. It will output any 810 as xml, html or back to text with whitespace for easier inspection. The unit tests includes a sample of the Walmart 810 from the site: http://www.jobisez.com/edi/tp/guide.aspx?doc=/edi-igs/Walmart/810Invoice5010.pdf.
The formatted text would look like this:
try: http://bots.sourceforge.net not so much a library, but translates edifact to the format you prefer....xml....csv....etc
We have implemented 834 EDI to XML using Java + Smooks 1.6. It's awesome!