Home > XML IDE - XML Editor > XML Editor Key Features > EDI Tools > EDIFACT Sample
EDIFACT Sample Converted to XML
This shows a sample EDIFACT document before and after conversion to XML,
displaying markup and full automatically-generated internal documentation.
Sample EDIFACT Document
UNA:+.? '
UNB+UNOA:3+STYLUSSTUDIO:1+DATADIRECT:1+20051107:1159+6002'
UNH+SSDD1+ORDERS:D:03B:UN:EAN008'
BGM+220+BKOD99+9'
DTM+137:20051107:102'
NAD+BY+5412345000176::9'
NAD+SU+4012345000094::9'
LIN+1+1+0764569104:IB'
QTY+1:25'
FTX+AFM+1++XPath 2.0 Programmer's Reference'
LIN+2+1+0764569090:IB'
QTY+1:25'
FTX+AFM+1++XSLT 2.0 Programmer's Reference'
LIN+3+1+1861004656:IB'
QTY+1:16'
FTX+AFM+1++Java Server Programming'
LIN+4+1+0596006756:IB'
QTY+1:10'
FTX+AFM+1++Enterprise Service Bus'
UNS+S'
CNT+2:4'
UNT+22+SSDD1'
UNZ+1+6002'
|
(The original raw EDIFACT sample file edifact-sample.txt
is here).
Equivalent EDIFACT XML Document as Converted by Stylus Studio®
Why is the XML so much bigger than the EDI?
The EDI omits almost all of the markup, so that an independent processor doesn't
know the meaning of each element. XML includes that, so engines like
XSLT and
XQuery
can do their magic. What you don't see in the EDI is the megabytes of
dictionary information you need to decode it, and the megabytes of code necessary
to alter in case on little element is inserted or removed. That is where XML
shines. And you can use it in your own programs, thanks to the
data conversion API.
<EDIFACT>
<UNB>
<UNB01>
<UNB0101><>UNOA<></UNB0101>
<UNB0102><>4<></UNB0102>
</UNB01>
<UNB02>
<UNB0201><>STYLUSSTUDIO</UNB0201>
<UNB0202><>1<></UNB0202>
</UNB02>
<UNB03>
<UNB0301><>DATADIRECT</UNB0301>
<UNB0302><>1<></UNB0302>
</UNB03>
<UNB04>
<UNB0401><>20051107</UNB0401>
<UNB0402><>1159</UNB0402>
</UNB04>
<UNB05><>6002</UNB05>
</UNB>
<ORDERS>
<UNH>
<UNH01><>SSDD1</UNH01>
<UNH02>
<UNH0201><>ORDERS</UNH0201>
<UNH0202><>D</UNH0202>
<UNH0203><>03B</UNH0203>
<UNH0204><>UN</UNH0204>
<UNH0205><>EAN008</UNH0205>
</UNH02>
</UNH>
<BGM>
<BGM01>
<BGM0101><>220<></BGM0101>
</BGM01>
<BGM02>
<BGM0201><>BKOD99</BGM0201>
</BGM02>
<BGM03><>9<></BGM03>
</BGM>
<DTM>
<DTM01>
<DTM0101><>137<></DTM0101>
<DTM0102><>20051107</DTM0102>
<DTM0103><>102<></DTM0103>
</DTM01>
</DTM>
<GROUP_2>
<NAD>
<NAD01><>BY<></NAD01>
<NAD02>
<NAD0201><>5412345000176</NAD0201>
<NAD0203><>9<></NAD0203>
</NAD02>
</NAD>
</GROUP_2>
<GROUP_2>
<NAD>
<NAD01><>SU<></NAD01>
<NAD02>
<NAD0201><>4012345000094</NAD0201>
<NAD0203><>9<></NAD0203>
</NAD02>
</NAD>
</GROUP_2>
<GROUP_28>
<LIN>
<LIN01><>1</LIN01>
<LIN02><>1<></LIN02>
<LIN03>
<LIN0301><>0764569104</LIN0301>
<LIN0302><>IB<></LIN0302>
</LIN03>
</LIN>
<QTY>
<QTY01>
<QTY0101><>1<></QTY0101>
<QTY0102><>25</QTY0102>
</QTY01>
</QTY>
<FTX>
<FTX01><>AFM<></FTX01>
<FTX02><>1<></FTX02>
<FTX04>
<FTX0401><>XPath 2.0 Programmer's Reference</FTX0401>
</FTX04>
</FTX>
</GROUP_28>
<GROUP_28>
<LIN>
<LIN01><>2</LIN01>
<LIN02><>1<></LIN02>
<LIN03>
<LIN0301><>0764569090</LIN0301>
<LIN0302><>IB<></LIN0302>
</LIN03>
</LIN>
<QTY>
<QTY01>
<QTY0101><>1<></QTY0101>
<QTY0102><>25</QTY0102>
</QTY01>
</QTY>
<FTX>
<FTX01><>AFM<></FTX01>
<FTX02><>1<></FTX02>
<FTX04>
<FTX0401><>XSLT 2.0 Programmer's Reference</FTX0401>
</FTX04>
</FTX>
</GROUP_28>
<GROUP_28>
<LIN>
<LIN01><>3</LIN01>
<LIN02><>1<></LIN02>
<LIN03>
<LIN0301><>1861004656</LIN0301>
<LIN0302><>IB<></LIN0302>
</LIN03>
</LIN>
<QTY>
<QTY01>
<QTY0101><>1<></QTY0101>
<QTY0102><>16</QTY0102>
</QTY01>
</QTY>
<FTX>
<FTX01><>AFM<></FTX01>
<FTX02><>1<></FTX02>
<FTX04>
<FTX0401><>Java Server Programming</FTX0401>
</FTX04>
</FTX>
</GROUP_28>
<GROUP_28>
<LIN>
<LIN01><>4</LIN01>
<LIN02><>1<></LIN02>
<LIN03>
<LIN0301><>0596006756</LIN0301>
<LIN0302><>IB<></LIN0302>
</LIN03>
</LIN>
<QTY>
<QTY01>
<QTY0101><>1<></QTY0101>
<QTY0102><>10</QTY0102>
</QTY01>
</QTY>
<FTX>
<FTX01><>AFM<></FTX01>
<FTX02><>1<></FTX02>
<FTX04>
<FTX0401><>Enterprise Service Bus</FTX0401>
</FTX04>
</FTX>
</GROUP_28>
<UNS>
<UNS01><>S</UNS01>
</UNS>
<CNT>
<CNT01>
<CNT0101><>2<></CNT0101>
<CNT0102><>4</CNT0102>
</CNT01>
</CNT>
<UNT>
<UNT01><>22</UNT01>
<UNT02><>SSDD1</UNT02>
</UNT>
</ORDERS>
<UNZ>
<UNZ01><>1</UNZ01>
<UNZ02><>6002</UNZ02>
</UNZ>
</EDIFACT>
|