java" -jar "\validator-1.5.0-distribution\validationtool-1.5.0-standalone.jar" -s "\validator-configuration-xrechnung_3.0.2_2024-06-20\scenarios.xml" -r "\validator-configuration-xrechnung_3.0.2_2024-06-20" "eInvoice.xml" -h -o \outputWithout TPL library download exe from here source code from here. If you need XML files good and wrong for tests, download from here. With TPL library download from here , source from here Source you can also find on GitHub
Validation of XML Files for Electronic Invoicing
- Details
- Written by: Stanko Milosev
- Category: Downloads
- Hits: 813
First, a bit of background.
Electronic invoicing (also called e-invoicing or einvoicing) is a form of electronic billing.
Under EU Directive 2014/55/EU on electronic invoicing in public procurement, the EU commissioned the development of a "European standard on electronic invoicing" - European Union, Directive 2014/55/EU on Electronic Invoicing in Public Procurement, 16 April 2014, Article 3
EN 16931-2 Electronic invoicing - Part 2: List of syntaxes that comply with EN 16931-1 describes the syntaxes that can be used to represent an electronic invoice: UBL 2.1 - Universal business language version 2.1 and CII 16B - Cross Industry Invoice in XML Schemas 16B XML files.
The official Schematron eInvoicing-EN16931 artefacts for CEN/TC 434 are here
The abreviation EN16931 stands for EN - abbreviated EN, from the German name Europäische Norm ("European Norm") and it was developed by European Committee for Standardization (CEN, French: Comité Européen de Normalisation)
---
The problem is that .NET natively supports neither Schematron validation nor XSLT (Extensible Stylesheet Language Transformations) 2.0
In my list of articles I gave a few examples of how Electronic Invoicing XML documents can be validated in .NET. The result is my application for document validation.
Another way to test if XML documents comply with EN16931 standard is by using KoSIT Validator. Here is an example using KoSIT Validator 1.5.0 and Validator Configuration 2024-06-20 compatible with XRechnung 3.0.x: