The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

edi2xml - translate UN/EDIFACT messages to XML

SYNOPSIS

edi2xml [-i] [-i extension] filename.edi > filename.xml

DESCRIPTION

edi2xml is able to translate any UN/EDIFACT message or message fragment that is not using code list extensions into XML.

-i

Prior version of edi2xml provided a form that was more human readable. But thoses intends caused problems with stupid non validating XML parsers, so the default is now without intends. If you want to view them, the -i flag provides the old style.

-x

The 0.34 version provided some first way to use namespace migration for code list extensions. This way is still crude and not XML/RDF. For patching an extension SDBM into edi2xml use the -x switch without the trailing .dir/.pag.

filename.edi

Message fragments have to be preceded by an UNA Service advice String. Messages may have an optional leading UNA, or may start with an UNB Interchange Header, if the default Service advice String has been used.

BUGS

Most bugs are better called not yet implemented, e.g. missing external RDF files as can be seen in the Roadmap section of the README file, but the existing code has certainly many others. Drop me a note, if you found some missbehavior.

I call XML::Edifact an aproach towards XML/EDI as a prototype in Perl. Nothing is carved in stone, but should be better viewed as painted on wood with the coal from fire, intended to become thrown into the fire to provide coal for the release. So drop me a note, if you think something has to be changed.

SEE ALSO

XML::Edifact XML::Parser.

For further study, browse at http://www.unece.org/trade/, http://www.unece.org/trade/untdid/download/d99a.zip, http://www.w3.org/TR/REC-xml, http://www.xmledi.org/ and http://www.xml-edifact.org/.

AUTHOR

Kraehe@Bakunin.North.De - Michael Koehne - MK25-RIPE

SCRIPT

use Config;

my $file = $ARGV[0];

$script =~ s/\~(\w+)\~/$Config{$1}/eg; if (!(open(FILE, ">$file")) || !(print FILE $script) || !(close(FILE))) { die "Error while writing $file: $!\n"; } print "Extracted $file from ",__FILE__," with variable substitutions.\n";

# end 0;