Skip to content
Leksiqq edited this page Apr 6, 2024 · 6 revisions

Attention! This article, as well as this announcement, are automatically translated from Russian.

Net.Leksi.Edifact

The Net.Leksi.Edifact library is designed to convert messages from the EDIFACT format to XML and vice versa. The library also contains a number of utilities for creating a working environment.

All classes are contained in the Net.Leksi.Edifact namespace.

Contents of the library

The following functionality is available.

  • EdifactDownloaderCLI: preparation of a command line application for downloading specifications from the site UNECE with converting them into a set of XML schemas, which are subsequently used as a grammar, and to check data and structure restrictions for the translator between formats.
  • EdifactMessageCustomizerCLI: preparation of a command line application for editing the specification of a standard message (customization) for the needs of an agreed exchange between specific parties. This includes reducing the set of segments used and changing data restrictions.
  • EdifactMessageVisualizerCLI: template command line application for visualizing the specification of a standard or abbreviated message in the form of a tree of segments and groups of segments.
  • EdifactParser: translation of the incoming flow of the exchange session (interchange) into events:
    • start of the session;
    • beginning of the functional group (if any);
    • the beginning of the message, the handler must provide a stream for writing the XML document received from the message;
    • end of message;
    • end of the functional group (if any);
    • end of the session.
  • EdifactBuilder: broadcasting calls of the corresponding methods to the specified outgoing stream of the exchange session:
    • start of the session;
    • beginning of the functional group (if any);
    • message transmission, the sender provides a stream to read the XML document for translation into the message;
    • end of the functional group (if any);
    • end of the session.
  • EdifactParserCLI: template command line application for translating the exchange file into XML files.

In addition to the library, the working environment includes a directory of XML schemas containing schemas obtained from downloaded specifications, as well as custom schemas. More details...

Customization is carried out using a script, which is an XML schema of a special structure. More...

The structure of XML documents is described Here.

Contents of the library

Obtaining specifications

  • EdifactDownloaderCLI - preparation of a command line application for downloading specifications from the site UNECE with their conversion into a set of XML schemas, which are subsequently used as a grammar, and to check data and structure restrictions for the translator between formats.

XML structure

Customization

Visualization

  • EdifactMessageVisualizerCLI - a template class for a command line application for visualizing the message tree at the level of segments and segment groups.

Translation from EDIFACT to XML

Translation from XML to EDIFACT

Header classes

These are types that correspond to the EDIFACT header and trailer system types.

Header Property Classes

Miscellaneous

  • IStreamFactory - factory interface for unified receipt of I/O streams in different environments.
  • LocalFileStreamFactory - implementation of the IStreamFactory interface for the local file system.
  • Formats - a class to facilitate the use of some numbered formats from the EDIFACT specification.

Back to top

Clone this wiki locally