Skip to content

PEPPOL-EN16931-R008: Document contains empty elements

Peppol and XRechnung do not allow elements without content: leave an element out instead of writing it empty.

Severity
Error the invoice fails validation.
Rule set
Peppol BIS Billing 3.0.21 (OpenPeppol); XRechnung 3.0.2 (KoSIT)
Where it applies
  • Peppol BIS Billing 3.0
  • XRechnung 3.0 in UBL and CII (Germany)

Official rule text

Document MUST not contain empty elements.

What the rule checks

Every element that has no child elements and no text other than spaces fails the rule, including empty elements that carry attributes, such as <cbc:EndpointID schemeID="EM"></cbc:EndpointID>.

The XRechnung version of the rule makes one exception: an empty cbc:ID inside cac:OrderReference. The Peppol BIS version has no exception.

Common causes

  • A template writes every element and fills in the value only when the field is set.
  • An optional field is empty in the master data, for example an accounting reference or a second address line.

How to fix it

Write optional elements only when they have a value. Removing the empty element is enough; the rule does not ask for a value.

If the element is mandatory, the empty element hides a missing value: fill it in, and check the rule that requires the element.

Rejected
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:AccountingCost/>
<cbc:BuyerReference>04011000-12345-03</cbc:BuyerReference>
<cac:OrderReference>
  <cbc:ID>4500012345</cbc:ID>
  <cbc:SalesOrderID></cbc:SalesOrderID>
</cac:OrderReference>
Passes
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>04011000-12345-03</cbc:BuyerReference>
<cac:OrderReference>
  <cbc:ID>4500012345</cbc:ID>
</cac:OrderReference>

UBL excerpts; elements that play no part in the rule are left out.

Can the fix page repair it?

No. Correct it in the system that creates the invoice, then check the new file.

Repair a rejected invoice

Check your invoice against the official rules

Upload an XML or PDF invoice. You get every failing rule with an explanation, the fix and the line in the file. Free, without sign-up; the check on this page stores nothing.

Drop an invoice hereXRechnung, EN 16931 or Peppol (UBL / CII), a ZUGFeRD / Factur-X PDF, Facturae or KSeF FA(3). Up to 2 MB.
No invoice at hand?

Processed in memory and not stored. No sign-up needed.