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] [-x extension] filename.edi > filename.xml

DESCRIPTION

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

-i

Prior versions of edi2xml provided a form that was more human readable. But the 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 an initial 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 a UNB Interchange Header, if the default Service advice String has been used.

BUGS

Most bugs might better be 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 find some misbehavior.

I call XML::Edifact an aproach towards XML/EDI as a prototype in Perl. Nothing is carved in stone, but should be seen as painted on wood with the coal from fire, intended to be thrown into the fire to provide fuel for the release. So drop me a note, if you think something should 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@Copyleft.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;