Back to blogTechnical Guides

UBL vs CII: Choosing the Right XML Syntax for EU E-Invoicing

EN 16931 supports two XML syntaxes: UBL 2.1 and UN/CEFACT CII. Here's when to use each, how they differ technically, and why it matters for validation.

Invoice Navigator TeamJuly 7, 202612 min read

UBL vs CII: Choosing the Right XML Syntax for EU E-Invoicing

If you're implementing EU e-invoicing, you'll hit this fork in the road early: do you generate UBL or CII invoices?

The question sounds simple. The answer is surprisingly nuanced. Both syntaxes are officially supported by the European standard EN 16931. Both can express exactly the same invoice data. Both pass through the same business rule validation. But they have different XML structures, different namespace conventions, different validation rule prefixes, and — critically — different adoption patterns across Europe.

This guide walks through the technical differences, the country-by-country landscape, and how to make the right choice for your integration.

What UBL and CII Actually Are

First, a clarification that trips up many developers: UBL and CII are not competing e-invoice standards. They are two different XML serializations of the same semantic model.

EN 16931 defines the semantic data model — a set of business terms (BT-1 through BT-189) that describe what an invoice must contain. Think of it as an abstract specification: "an invoice has an invoice number, an issue date, a seller, a buyer, line items, totals."

The standard doesn't dictate how those business terms are encoded in XML. That's where the syntaxes come in:

  • UBL 2.1 (Universal Business Language) — an OASIS standard. XML elements use cbc: and cac: namespace prefixes. The root element is <Invoice> or <CreditNote>.
  • UN/CEFACT CII D16B (Cross Industry Invoice) — a UN/CEFACT standard. XML elements use ram:, rsm:, and udt: namespace prefixes. The root element is <CrossIndustryInvoice>.

Both syntaxes can represent every EN 16931 business term. An invoice generated as UBL and the same invoice generated as CII contain identical business information — just wrapped in different XML element names and structures.

The Key Structural Differences

If you put a UBL invoice and a CII invoice side by side, the differences jump out immediately. Here's how the same invoice number (BT-1) and issue date (BT-2) look in each:

UBL 2.1:

<ubl:Invoice
  xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
  xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
  <cbc:ID>INV-2026-0042</cbc:ID>
  <cbc:IssueDate>2026-07-07</cbc:IssueDate>
  <!-- ... -->
</ubl:Invoice>

CII D16B:

<rsm:CrossIndustryInvoice
  xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
  xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
  xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
  <rsm:ExchangedDocument>
    <ram:ID>INV-2026-0042</ram:ID>
    <ram:IssueDateTime>
      <udt:DateTimeString format="102">20260707</udt:DateTimeString>
    </ram:IssueDateTime>
  </rsm:ExchangedDocument>
  <!-- ... -->
</rsm:CrossIndustryInvoice>

Notice three things:

  1. Nesting depth. CII wraps the invoice number inside ExchangedDocument, while UBL puts it at the root level. CII generally has deeper nesting — the invoice date requires an extra layer (IssueDateTime > DateTimeString), while UBL uses a flat IssueDate element.

  2. Date format. UBL uses ISO 8601 dates (2026-07-07). CII uses a format-coded date string (20260707 with format="102"). This is one of the most common sources of validation errors when developers switch between syntaxes.

  3. Namespace prefixes. UBL uses two main prefixes (cbc: for basic components, cac: for aggregate components). CII uses three (rsm: for the document root, ram: for reusable entities, udt: for data types).

Full Structural Comparison

AspectUBL 2.1CII D16B
Root element<Invoice> or <CreditNote><CrossIndustryInvoice>
Namespace prefixescbc:, cac:, ubl:ram:, rsm:, udt:, qdt:
Date formatISO 8601 (YYYY-MM-DD)Format-coded (YYYYMMDD with format="102")
Nesting depthFlatter — most BTs are 2-3 levels deepDeeper — many BTs are 3-5 levels deep
Seller info pathcac:AccountingSupplierParty/cac:Partyram:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty
Line itemscac:InvoiceLineram:IncludedSupplyChainTradeLineItem
Document sizeTypically 15-30% smallerLarger due to deeper nesting
XSD schemasOASIS UBL 2.1 packageUN/CEFACT D16B package

The size difference isn't trivial at scale. If you're processing thousands of invoices daily, the more compact UBL format means less bandwidth, faster parsing, and smaller storage footprint.

Validation Rules: UBL-CR vs CII-SR

Here's where the syntax choice directly affects your development workflow. EN 16931 defines a shared set of business rules (the BR-* rules) that apply regardless of syntax. But each syntax also has its own set of conformance rules that prevent the use of XML elements not mapped to EN 16931 business terms.

  • UBL Conformance Rules (UBL-CR-*) — roughly 700 rules that flag any UBL element used outside the EN 16931 scope. If your invoice includes a UBL element that doesn't map to an EN 16931 business term, you'll get a UBL-CR-* error.
  • CII Syntax Rules (CII-SR-*) — the equivalent set for CII, flagging non-EN 16931 CII elements.

These rules exist because both UBL and CII are general-purpose XML standards with far more elements than EN 16931 uses. UBL defines hundreds of elements for purchase orders, despatch advice, catalogues — only a subset applies to invoices. The conformance rules enforce that subset.

In practice, UBL-CR-* errors are among the most common validation failures. Developers who know UBL well sometimes include elements that are valid UBL but not valid EN 16931 — like cac:Delivery/cac:DeliveryAddress (EN 16931 uses cac:DeliveryLocation/cac:Address instead). You can browse these in the format errors category.

Which Countries and Formats Use Which

This is the practical question. Your syntax choice is usually driven by where you're sending invoices and which network or format they need to comply with.

UBL-First Markets and Formats

  • Peppol BIS Billing 3.0 — the pan-European e-invoicing network uses UBL 2.1 exclusively. If you're sending invoices through Peppol, you need UBL.
  • XRechnung — Germany's national CIUS supports both UBL and CII, but UBL is the primary syntax. Most German government portals (ZRE, OZG-RE) were built with UBL in mind.
  • Netherlands — uses Peppol, so UBL.
  • Belgium — the upcoming B2B mandate builds on Peppol infrastructure, meaning UBL.
  • Italy (FatturaPA) — uses its own XML schema (not UBL or CII), but Peppol traffic to/from Italy uses UBL.
  • Nordic countries (Sweden, Norway, Finland, Denmark) — all heavily Peppol-based, all UBL.

CII-First Markets and Formats

  • Factur-X — the Franco-German hybrid PDF/XML format uses CII. The XML is embedded inside a PDF/A-3 container.
  • ZUGFeRD — technically the same specification as Factur-X (jointly maintained), uses CII. The German B2B market widely uses ZUGFeRD for non-Peppol invoicing.
  • France — the French mandate (Chorus Pro and the upcoming B2B system) accepts Factur-X, which means CII. However, the Peppol channel to French public sector uses UBL.
  • Switzerland — accepts both, but the domestic market leans toward ZUGFeRD/CII for PDF-based workflows.

Both Syntaxes

  • Germany — supports both via XRechnung (UBL or CII) and ZUGFeRD (CII). The 2027 B2B mandate is format-neutral: anything EN 16931-compliant works.
  • Austria — ebInterface is the domestic format (neither UBL nor CII), but Peppol traffic uses UBL and ZUGFeRD is accepted for B2B.

When to Choose UBL

Choose UBL if:

  • You're integrating with Peppol. There's no CII option on the Peppol network. All Peppol BIS Billing 3.0 invoices are UBL.
  • Your primary markets are Northern/Western Europe. The Netherlands, Belgium, Nordics, and most Peppol-connected countries expect UBL.
  • You want the smaller file format. UBL's flatter structure produces more compact XML.
  • Your ERP already generates UBL. Many modern ERP systems (SAP S/4HANA, Microsoft Dynamics, Oracle) have UBL export capabilities built in.
  • You're sending to German public sector. XRechnung UBL is the path of least resistance for ZRE and OZG-RE portals.

When to Choose CII

Choose CII if:

  • You need hybrid PDF invoices. Factur-X and ZUGFeRD use CII. If your recipients need a human-readable PDF with embedded structured data, CII is required.
  • Your primary market is France. The French ecosystem is built around Factur-X/CII.
  • You're in German B2B and not using Peppol. Many German businesses exchange invoices via email with ZUGFeRD PDFs. This is CII.
  • Your recipients can't process pure XML. The hybrid PDF approach (CII embedded in PDF/A-3) lets recipients who lack e-invoicing infrastructure simply open and read the PDF, while automated systems extract the XML.

When to Support Both

If you're building a product that serves multiple markets — say, an ERP connector that handles both German B2B (ZUGFeRD/CII) and Peppol (UBL) — you'll need both syntaxes. The good news: since both map to the same EN 16931 semantic model, you can build your internal data model around the business terms (BT-1, BT-2, etc.) and serialize to either syntax at the output stage.

This is the pattern most mature e-invoicing solutions use:

Source data → EN 16931 business terms (canonical model) → UBL or CII serializer → Validation → Delivery

The canonical model insulates your business logic from the syntax details. Adding a new syntax becomes a serialization concern, not a data model change.

Validation Workflow Differences

Regardless of which syntax you choose, the validation pipeline is the same:

  1. XSD schema validation — checks structural conformity against the UBL 2.1 or CII D16B schemas
  2. EN 16931 business rules (BR-*) — same rules, applied to both syntaxes via syntax-specific XPath expressions
  3. Conformance rules (UBL-CR-* or CII-SR-*) — syntax-specific element filtering
  4. CIUS/format rules — XRechnung BR-DE-*, Peppol PEPPOL-EN16931-R*, etc.

The important thing to understand: the BR-* business rules are logically identical but technically different. The Schematron files use different XPath expressions for UBL and CII because the element paths differ. BR-16 (payable amount must exist) checks cac:LegalMonetaryTotal/cbc:PayableAmount in UBL but ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:DuePayableAmount in CII. Same rule, different XPath.

This means you need the correct Schematron file for your syntax. Running a CII invoice through UBL Schematron rules will produce meaningless errors. A good validator like Invoice Navigator's validator detects the syntax automatically and applies the right rule set — but if you're using raw Schematron files in a custom pipeline, make sure you're loading the correct ones.

Validate UBL and CII Instantly

Drop any UBL or CII invoice into the free validator. It auto-detects the syntax, applies the right rules, and shows every error with a plain-English explanation.

Open Validator

Common Mistakes When Choosing a Syntax

1. Picking CII for Peppol. Peppol doesn't support CII. Some access points offer conversion, but it's an unnecessary translation step that can introduce errors. If Peppol is in your delivery path, generate UBL natively.

2. Assuming UBL is always simpler. UBL's flatter structure looks simpler, but it has more conformance rules (the UBL-CR-* set is larger than CII-SR-*). More rules means more potential validation failures during development.

3. Mixing syntax elements. This sounds obvious, but it happens: developers copy XML snippets from UBL examples into CII templates or vice versa. The namespaces are different. The element names are different. Even the date format is different. Copy-paste across syntaxes is a guaranteed validation failure.

4. Ignoring the CustomizationID / GuidelineSpecifiedDocumentContextParameter. This field (BT-24) identifies which specification your invoice conforms to. It's different for UBL and CII, and it's different for each CIUS version. Validators check this first — a wrong identifier means every subsequent rule may not apply correctly.

5. Not testing CII-based XRechnung. XRechnung officially supports CII, but it was originally designed around UBL. Some CII edge cases in the XRechnung Schematron rules have historically lagged behind. If you're generating CII-based XRechnung, validate thoroughly before going to production.

FAQ

Can I convert between UBL and CII?

Yes, since both express the same EN 16931 business terms, lossless conversion is theoretically possible. In practice, you need a reliable mapping library. The European Commission provides reference XSLT stylesheets for EN 16931 UBL-to-CII and CII-to-UBL conversion. But always revalidate after conversion — subtle mapping differences (especially around date formats and optional fields) can introduce errors.

Which syntax has better tooling?

UBL has broader tooling support because of its adoption by Peppol and OASIS. Most XML editors, ERP systems, and e-invoicing libraries have mature UBL support. CII tooling is strong in the Factur-X/ZUGFeRD ecosystem but less widespread globally. If you're starting from scratch and don't have a strong reason to pick CII, UBL typically offers a smoother development experience.

Does EN 16931 favor one syntax over the other?

No. The standard is explicitly syntax-neutral. Both syntaxes are normative binding references in the EN 16931 specification. The European Commission has not expressed a preference, and both will continue to be supported.

What about performance — is one faster to parse?

UBL documents are typically 15-30% smaller than equivalent CII documents due to less nesting and shorter element names. In high-throughput pipelines processing thousands of invoices per second, this difference can matter for parsing speed and memory usage. For most applications, though, the difference is negligible.

Will the EU eventually standardize on one syntax?

There's no indication of this. The dual-syntax approach is a pragmatic compromise: UBL has strong adoption in public sector and Peppol networks, while CII has strong adoption in the PDF-hybrid invoice world. Forcing a single syntax would require massive migration efforts across the continent with no clear benefit.

How does Invoice Navigator handle both syntaxes?

The validator automatically detects whether an uploaded invoice is UBL or CII (or a ZUGFeRD/Factur-X PDF with embedded CII), applies the correct XSD schema and Schematron rules, and returns structured validation results. The API works the same way — send any supported format and the correct rule set is applied automatically.


Building an e-invoicing pipeline that handles multiple formats? Start with the free validator to test your invoices, or check the API documentation for programmatic integration. For a deeper dive into the validation rule layers, see E-Invoice Schematron Rules Explained.

Check Your Compliance Status

Find out exactly what your business needs to do for e-invoicing compliance.

Use Obligation Finder