Very simplistic parser that converts EDIFACT into a DOM tree for further processing to perform the data extraction/transformation/binding. Useful and easy to use when complete mapping is unnecessary.
An executable JAR of the parser is available.
Usage:
java -jar edifact-to-xml.jar <edifact-filename>
This wil emit the DOM tree as XML to standardout.
Example input:
UNA:+.? '
UNB+IATB:1+6XPPC+LHPPC+940101:0950+1'
UNH+1+PAORES:93:1:IA'
MSG+1:45'
IFT+3+X?'???:?+?&YZCOMPANY AVAILABILITY'
UNT+13+1'
UNZ+1+1'
Output:
<document><UNA><e><c>:+.? '</c></e></UNA><UNB><e><c>IATB</c><c>1</c></e><e><c>6XPPC</c></e><e><c>LHPPC</c></e><e><c>940101</c><c>0950</c></e><e><c>1</c></
e></UNB><UNH><e><c>1</c></e><e><c>PAORES</c><c>93</c><c>1</c><c>IA</c></e></UNH><MSG><e><c>1</c><c>45</c></e></MSG><IFT><e><c>3</c></e><e><c>X'?:+&YZCOMPANY AVAILABILITY</c></e></IFT><UNT>
<e><c>13</c></e><e><c>1</c></e></UNT><UNZ><e><c>1</c></e><e><c>1</c></e></UNZ></document>
Features
- EDIFACT to XML conversion using DOM.