Importing X12 Schemas to EDI SDK


Requirements:
EDISDK

Introduction

EDI Objects in EDI SDK provide a strongly typed, schema-driven interface to X12 documents. Rather than navigating segments by tag names and tracking element positions with numeric indexes, EDI Objects model X12 documents as an object hierarchy that mirrors the underlying schema. This guide covers the process of importing X12 official schemas into our XML format for use in EDI SDK components and EDI Objects.

Obtaining Source Schemas

X12 source schemas for EDI SDK must be obtained prior to use. X12 schemas are not distributed with EDI SDK, but they can be obtained from X12.org.

Importing X12 XML Schemas

Once the X12 schemas have been obtained, they can be imported into EDI SDK using the x12import.exe utility distributed with EDI SDK. During this process, the official X12 schemas are converted into an XML format that is optimized, streamlined, and usable by EDI SDK components and the EDI Object generation tool.

The CLI command follows this pattern for X12 in order to import X12's 4010 schema: x12import C:\x12schemas\004010-XSD.zip -o C:\xmlschemas\004010.xml x12import C:\x12schemas\004010-XSD.zip -m T810,T820 -o C:\xmlschemas\004010.xml

Next Steps

After the X12 XML schemas have been generated, the next steps depend on the intended use case. If the XML schemas are to be used directly, they can be employed with EDI SDK components for parsing, validation, and processing of EDI documents. For more information on using XML schemas directly with EDI SDK components, see Getting Started with X12Reader

If an object-oriented interface is preferred, EDI Object classes can be generated for specific transaction sets. These classes provide a strongly typed programming interface, allowing EDI documents to be created, populated, and manipulated more easily. For a detailed walkthrough on class generation and API usage, see Generating and Using EDI Objects.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.