EDI to XML component
The EDI to XML component, when configured with the appropriate delimiters used by the EDI file, transforms the content of the EDI file to XML.
Configuration
The EDI to XML component has the following configuration options:
Segment
Specifiy the delimiter to identify different segments, the first is considered to be the header. By default this is LB
.
The LB
delimiter is a special keyword that is interpreted as a line break. It is only available as a segment delimiter.
Field
Specify the delimiter to identify different fields. By default this is ~
.
Component
Specify the delimiter to identify different components. By default this is ^
.
Sub component
Specify the delimiter to identify different sub-components. By default this is !
.
Using EDI to XML
See the example below how the transformation from EDI to XML takes place.
- EDI Input
- XML Output
CUS~John^Doe~1901-01-07~john.doe@example.com
<edi-message>
<delimiters segment="LB" field="~" component="^" sub-component="!" />
<CUS>
<field.1>
<component.1>John</component.1>
<component.2>Doe</component.2>
</field.1>
<field.2>1901-01-07</field.2>
<field.3>john.doe@example.com</field.3>
</CUS>
</edi-message>
The XML representation of an EDI file includes an element describing the delimiters used during the transformation.