The CII file: reading a UN/CEFACT invoice
CII is the second XML syntax of the European standard, and the one hybrid PDFs tuck inside themselves. It is pure XML: nothing displays if you open it as it is.
What CII is
CII stands for Cross Industry Invoice. It is published by UN/CEFACT, the United Nations body in charge of standardising trade exchanges. The data library version commonly used for European invoicing is D22B.
A CII file is an XML document. Its root element is called <CrossIndustryInvoice>: that name is how you tell it apart from a UBL file, whose first element is <Invoice> or <CreditNote>.
Like UBL, CII complies with the European EN 16931 standard. It therefore expresses exactly the same information, under different tag names.
CII and hybrid PDFs: the same content, two wrappers
This is the most useful thing to take away from this page: Factur-X and ZUGFeRD embed CII. A hybrid PDF is a PDF carrying a CII file as an attachment. A standalone CII file is that same XML, without the PDF around it.
The consequence is pleasant: what you learn about one applies to the other. Same tags, same checks, same findings. The only difference is the wrapper — and therefore whether there is a page to print. See Factur-X and ZUGFeRD for that part.
The structure: three large blocks
A CII file is always organised the same way, which helps a great deal when hunting for something by hand:
ExchangedDocumentContext— the context: the declared profile, that is, which variant of the standard the file claims to follow.ExchangedDocument— the header: invoice number, issue date, document type, free-text notes.SupplyChainTradeTransaction— the body, which gathers the invoice lines, the commercial agreement between the parties, the delivery and the settlement.
The prefixes you will meet most often are rsm: for the envelope and ram: for the data itself. As in UBL, those prefixes are chosen freely by the issuer: only the name that follows carries meaning.
Two details that surprise everyone at first
Dates. They are written run together, in format 102: 20260901 reads as 1 September 2026. That is not a typo by the issuer, it is the convention of the format.
Codes. Many values are codes rather than words: the document type, the VAT category, the unit of measure, the payment means. An S in the VAT category means the standard rate, an E means exempt. Read raw, these codes say nothing; translating them is a reader’s job.
When read here, those conventions are converted: dates are spelled out, codes are replaced by their label, and amounts pick up ordinary punctuation.
How to read a CII file
- Drop the
.xmlfile — you do not need to know in advance that it is CII. - The syntax is recognised from the root element of the document.
- The invoice appears laid back out, with the declared profile at the top.
- The EN 16931 checks are applied, and every finding is explained.
If the file is incomplete it is still displayed: what could be read appears, and what is missing is flagged. Refusing to open an imperfect file would leave you alone at exactly the moment you need help. To place CII among the other formats, see the comparison.
Frequently asked questions
What does D22B mean?
It is the version number of the data library published by UN/CEFACT that the format builds on. You have nothing to do with it day to day: it is a technical indication meant for software.
My file starts with CrossIndustryInvoice. What does that tell me?
That you are holding a CII file, the UN/CEFACT syntax of the European standard. It is a complete electronic invoice, simply stripped of any layout. Drop it to read it in plain language.
CII or UBL — which should I ask my supplier for?
Both carry the same standard and therefore the same information. The choice mostly depends on what your supplier’s software can produce. On the reading side, it makes no difference to you.
Can I open a CII file with a PDF reader?
No. A standalone CII file is not a PDF: it is a structured text file, with no page and no layout. Only the hybrid formats combine the two, by placing a CII file inside a PDF.