# PEPPOL-EN16931-R008 Document must not contain empty elements

PEPPOL-EN16931-R008 reports every XML element that has neither text nor child elements, for example <cbc:Note/> or <cbc:Telephone> </cbc:Telephone>. Attributes do not count as content, so <cbc:EndpointID schemeID="EM"/> is empty too. The KoSIT configuration for XRechnung 3.0.2 runs the rule as a fatal error for UBL and CII. It skips only an empty cbc:ID in cac:OrderReference (UBL) and ram:ApplicableHeaderTradeDelivery, which the CII schema requires.

## Problem Description

> **ERROR**: Peppol BIS Billing 3.0 rule (OpenPeppol)

> **Where PEPPOL-EN16931-R008 is checked**
>
> A validator checks an e-invoice in stages. First the file must be well-formed XML that matches the UBL or CII schema (XSD). Then the EN 16931 business rules run: BR core rules, BR-CO calculations, BR-CL code lists, BR-DEC decimals and VAT-category rules such as BR-S. Next come the national or network rules that BT-24 selects: BR-DE for XRechnung, PEPPOL-EN16931 for Peppol BIS Billing. The report lists every failed rule: one error means reject, warnings alone still mean accept. PEPPOL-EN16931-R008: Peppol BIS Billing rule, reported in the stage “National rules (CIUS)”.

## Context and Significance

Empty elements usually come from export templates that write every field, even when the source has no value: an empty note, contact field, address line or party block. A placeholder hides the structural error but puts wrong data into the invoice.

## Solution

Remove the empty element. If its parent group then holds no data, remove the group as well. If the field is required, enter the real value from the source document. Do not fill the element with a placeholder such as "-" or "n/a". The location in the validator report (an XPath) names the element.

- [Validate XML](/en/xrechnung-validator?source=resource&rule=PEPPOL-EN16931-R008)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&rule=PEPPOL-EN16931-R008)

## Valid Examples

- <cbc:Telephone>+49 30 1234567</cbc:Telephone>
- No cbc:Note element when the invoice has no note

## Invalid Examples

- <cbc:Note/>
- <cbc:Telephone></cbc:Telephone>
- <cbc:EndpointID schemeID="EM"/>

## Code Examples

### Valid XML
```
<cac:Contact>
  <cbc:Name>Accounts receivable</cbc:Name>
  <cbc:Telephone>+49 30 1234567</cbc:Telephone>
  <cbc:ElectronicMail>billing@example.com</cbc:ElectronicMail>
</cac:Contact>
```

### Invalid XML
```
<cac:Contact>
  <cbc:Name>Accounts receivable</cbc:Name>
  <cbc:Telephone/>
  <cbc:ElectronicMail>billing@example.com</cbc:ElectronicMail>
</cac:Contact>
```

## Affected Fields

- [BT-22 Invoice note](/resources/xrechnung/bt-22-invoice-note)
- [BT-34 Seller electronic address](/resources/xrechnung/bt-34-seller-electronic-address)
- [BT-42 Seller contact telephone number](/resources/xrechnung/bt-42-seller-contact-telephone-number)

## Validation Tools

- [Official KoSIT Validator](https://github.com/itplr-kosit/validator): Run the official KoSIT validator with the XRechnung configuration to check EN 16931 and XRechnung rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Find validation errors during conversion and review each correction.

## Related Resources

- [Official Specification](https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [All validation errors](/resources/kosit-validator-errors): Overview of the EN 16931, XRechnung and Peppol validation rules explained here.
