NAME

XML::Edifact - Perl module to handle XML::Edifact messages.

SYNOPSIS

use XML::Edifact;
use IO::File;

# open the database
XML::Edifact::open_dbm();

# read edi message
XML::Edifact::read_edi_message("some.edi");

# print xml to standout
print &XML::Edifact::make_xml_message();

# print xml to somefile
$xml=new IO::File(">some.xml");
XML::Edifact::make_xml_message($xml);
$xml->close();

# close database
XML::Edifact::close_dbm();
0;

---------------------------------------------------------------

use XML::Edifact;
use IO::File;

# open the database
XML::Edifact::open_dbm();

# read xml message
XML::Edifact::read_xml_message($ARGV[0]);

# print edi to standout
XML::Edifact::make_edi_message();

# print edi to somefile
$edi=new IO::File(">some.edi");
XML::Edifact::make_edi_message($edi);
$edi->close();

# close database
XML::Edifact::close_dbm();
0;

DESCRIPTION

XML-Edifact started as Onyx-EDI which was a gawk script. XML::Edifact-0.4x still shows its bad ancestry (a2p) in some places.

The current module is able to generate some SDBM files for the directory pointed to by open_dbm, by parsing the original United Nations EDIFACT documents during Bootstrap.PL. Those files will be stored during make install.

The first typical usage will read an EDIFACT message into a buffer global to the package, and will print this message as XML on STDOUT. The second usage will do the opposite.

Those two files will be installed as edi2xml and xml2edi in your local bin directory. Use those two scripts and dont touch the internal affairs of the module. An object-oriented module is planned for the next release!

I'm calling this 0.4x track an interim, because I'm just saving a stable state (I hope) before I start to muddle all things around while going on an object(ive) raid.

If you have other EDIFACT files, I would like to include them in the next version. I'm also open to any comments; as they say, "everything is still in flux" !

AUTHOR

Michael Koehne, Kraehe@Copyleft.de

SEE ALSO

perl(1), XML::Parser(3), UN/EDIFACT Draft.