Modeling an electronic data interchange (EDI) document using extensible
Markup Language (XML) at runtime. A plurality of structural elements is
identified in the EDI document. A plurality of corresponding data values
is identified from the identified plurality of structural elements in the
EDI document. A plurality of annotations is generated for a plurality of
rules included in the EDI document. The plurality of rules defines
operations associated with the plurality of corresponding data values.
The determined data values and the generated annotated is transformed
into an XML schema corresponding to the EDI document. The XML schema is
processed at runtime.