E-invoicing · 7 minute read

How to read an electronic invoice XML file

An electronic invoice is structured business data, not a picture of an invoice. The XML can look intimidating, but a useful first review follows the same path as a human-readable invoice: identify the document, the parties, the lines, the tax and the amount due.

Use the related toolView e-invoice XML
Open tool

Start by identifying the syntax and document type

UBL invoices normally use an Invoice or CreditNote root element. UN/CEFACT CII documents use CrossIndustryInvoice. Namespace prefixes can vary, so a reliable reader looks at the namespace and local element name rather than assuming every file uses the same prefix.

The syntax alone does not prove that a document complies with EN 16931, Peppol BIS Billing, XRechnung or a national tax rule. It only tells you which vocabulary the sender used.

  • Document type and invoice number
  • Issue and due dates
  • Document currency
  • Profile or customization identifiers

Review parties, lines and totals in that order

Confirm the legal supplier and customer before looking at the total. Then review line descriptions, quantities, unit prices and line extensions. Finally compare the tax-exclusive amount, tax amount, tax-inclusive amount and payable amount.

A payable amount can differ from the tax-inclusive total because of prepayments, allowances, charges or rounding. Treat a mismatch as a prompt to inspect the underlying fields, not automatically as an error.

  • Supplier and customer legal names
  • Tax and endpoint identifiers
  • Line quantity, unit and price
  • Tax category and percentage
  • Allowance, charge and rounding amounts

Viewer, syntax check and validator are different jobs

A viewer makes selected fields readable. An XML syntax check confirms that the markup is well formed. A conformance validator applies schema and business rules for a specific specification and release. Passing one layer does not imply passing the next.

The 4g3n7 viewer is deliberately labelled as a viewer. It is useful for inspection before formal validation, but it does not issue a compliance verdict.

Use a privacy-preserving review workflow

Invoice files can contain names, addresses, tax identifiers, bank accounts and commercially sensitive line items. Prefer local processing for a first inspection and avoid pasting real invoices into untrusted online forms.

Keep the original file unchanged. If a validator reports an error, work on a copy, record the validation profile and rule version, and validate again after every correction.

Official and technical sources