Overview
XML-based EDI refers to a family of standards that use the Extensible Markup Language (XML) as the foundation for electronic business document exchange. Unlike traditional EDI formats such as EDIFACT and X12, which use compact but opaque delimiter-based syntax, XML-based standards use self-describing, hierarchical markup that is both machine-processable and human-readable.
The most prominent XML-based EDI standards include Universal Business Language (UBL), ebXML (Electronic Business using XML), cXML (Commerce XML), xCBL (XML Common Business Library), and various industry-specific XML schemas. These standards emerged in the late 1990s and early 2000s as the internet transformed business-to-business communication, and they continue to gain adoption, particularly in government procurement and e-invoicing mandates.
History
The movement toward XML-based EDI began in the late 1990s when the World Wide Web Consortium (W3C) published the XML 1.0 specification in 1998. The business community quickly recognized that XML's self-describing nature and wide tooling support could address many limitations of traditional EDI formats: the need for specialized translators, difficulty in debugging, and the high barrier to entry for smaller trading partners.
Several XML-based standards emerged in parallel. Microsoft, Ariba, and IBM promoted BizTalk, cXML, and xCBL respectively. The United Nations and OASIS (Organization for the Advancement of Structured Information Standards) developed ebXML as a comprehensive framework. OASIS also developed UBL, which has become the most widely adopted XML-based EDI standard, particularly after the European Union selected it as the basis for its e-invoicing directive.
Major XML EDI Standards
UBL (Universal Business Language)
UBL is an OASIS standard that defines a royalty-free library of XML business document schemas. UBL 2.1 and 2.3 are the current versions, defining over 80 document types. UBL is the foundation of the European e-invoicing standard (EN 16931) and is mandated for public procurement in many EU member states. The Peppol network, which connects government agencies and businesses across Europe and beyond, uses UBL as its primary document format.
ebXML (Electronic Business using XML)
ebXML is a modular suite of specifications developed jointly by UN/CEFACT and OASIS. It provides a comprehensive framework including a messaging service (ebMS), a registry/repository for business process definitions, a collaboration protocol agreement (CPA) mechanism, and a core component technical specification. ebXML is designed as an architecture rather than just a document format, addressing the full lifecycle of B2B integration.
cXML (Commerce XML)
cXML was developed by Ariba (now SAP Ariba) for procurement and supply chain transactions. It is widely used in the procurement space, particularly by organizations using SAP Ariba or similar e-procurement platforms. cXML defines transaction types for purchase orders, invoices, catalogs, and punch-out (supplier catalog browsing) scenarios.
xCBL (XML Common Business Library)
xCBL was developed by Commerce One and later maintained by the Sterling Commerce community. It provides a comprehensive set of XML document schemas for B2B transactions including orders, invoices, advance ship notices, and price catalogs. While less actively developed than UBL, xCBL is still used in legacy integrations.
Structure and Format
XML-based EDI documents use the standard XML syntax with namespaces, elements, and attributes. Below is a simplified UBL Invoice example:
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:ID>INV-2023-00451</cbc:ID>
<cbc:IssueDate>2023-06-15</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0088">5098765432100</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Supplier Company Ltd</cbc:Name>
</cac:PartyName>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="EA">500</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">12500.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Widget Type A</cbc:Name>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">25.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice> Use Cases
- European e-invoicing: The EU Directive 2014/55/EU mandates that public sector entities accept e-invoices in UBL or UN/CEFACT CII format via the Peppol network
- Government procurement: Many countries require XML-based documents for public procurement, including Denmark, Norway, Sweden, Italy, and Australia
- E-procurement platforms: SAP Ariba, Coupa, and other procurement platforms use cXML or UBL for document exchange
- Cross-border trade: ebXML messaging is used for customs and trade facilitation in Asia-Pacific countries
- Financial services: ISO 20022 XML messaging is transforming payment processing (related to but distinct from SWIFT migration)
Advantages
- Human-readable: XML documents can be opened in any text editor and understood without specialized translation software
- Self-describing: Element names convey meaning, reducing the need for external documentation to interpret data
- Validation: XML Schema (XSD) provides rigorous structural validation, and Schematron enables business rule validation
- Extensive tooling: XML parsers, editors, XSLT transformers, and XPath/XQuery processors are available in every programming language
- Web-native: XML works natively with HTTP, SOAP, and REST-based communication protocols
- Lower barrier to entry: Smaller organizations can implement XML EDI with standard web development tools, without investing in specialized EDI translators
Related Standards
XML-based EDI standards are often positioned as modern alternatives to EDIFACT and X12. Many EDI integration platforms support automatic mapping between traditional and XML formats. JSON-based EDI represents the next evolutionary step, offering even lighter syntax for API-driven integrations. In healthcare, HL7 CDA is an XML-based clinical document standard, while FHIR supports both XML and JSON. The GS1 organization has developed GS1 XML alongside its EANCOM EDIFACT standard for supply chain document exchange.