>Home>Learn XQuery>XQuery Examples>XML Examples>EDI Examples
Drastically simplify your next data integration project by following these EDI Examples. Learn to use EDI integration tools for converting, mapping and deploying advanced XML data integration applications which involve read/write access to legacy EDIFACT and X12 data sources.
Learn how to use EDI Mapping Tools and utilities to converting EDIFACT to XML, X12 to XML, and use
bi-directional adapters for running these conversions in your software applications.
These adapters can be used as part of XSLT and XQuery processing, part of XML
pipelines, or used directly within your own programs.
An example of how to convert an EDIFACT document into a
XML file. The comments can be optionally disabled when you're sure the data transformation
is just perfect.
Going from EDIFACT to XML is one thing, but we can do it backwards also.
The adapter is so transparent to your use, you can change the text in the
XML editor, save it back to disk, and see the change persisted in the EDIFACT file!
The X12 adapter, just like the EDIFACT adapter, can go from XML to X12 EDI.
Instead of using the X12 URL itself as the destination, simply prefix it with
adapter:EDI? and the output will happen through the X12 adapter. The syntax
and transaction set and even release will be detected from the XML stream, and
the details will be handled for you.
Instead of worrying about the syntactic idiosyncracies of X12, concentrate
on your data. This EDI example illustrates the bidirectional nature of the EDI adapter will handle the
details of creating a syntactically correct X12 file from the XML editor, or
even from your XQuery or XSLT transforms.
How do you know if the EDIFACT data you are working with is valid? How do you
map from a copy of some document to your ERP system's inputs? XML Schemas are
a useful mechanism for informing disparate applications of an XML document's
structure. This EDI example illustrates how to generate an XML Schema for
any message type and any version
that the EDIFACT standard supports. This can be used for
mapping or integration.
The DISA X12 standards are constantly being updated. How can you insure that
your data stream is valid against what's coming next? Being able to
create XML Schemas for
any transaction set or release,
and then being able to build maps or do
against said schemas can ease your burden.
Since Stylus Studio® can do
XML to EDI and
EDI to XML and
XML to XML, there is no reason why it shouldn't be able
to do EDI to EDI.
And the same XSLT and XQuery tools historically used for XML
mapping and transforming can now be used for working with
relational databases, or any combination.
Access EDI from XSLT or XQuery
XSLT and XQuery are excellent tools for dealing with tree-structured data
like XML. Up to this point, EDI has missed out, but the transparent URL-based
adapter library of Stylus Studio® can build your EDI bridge. Use EDI as if it
were XML — for input, for output, or even for both (to translate from
EDIFACT to X12 for example).
Standards, Standards, Standards and More EDI Standards
We provide for you a huge vocabulary of EDI standards. Just listing the versions takes four
pages of our website.
For the proprietary EDI vocabularies, the Convert to XML
tool within Stylus Studio® can help you build your own adapter, which can then
be used like any other adapter to go from EDI to XML.