KF-XML-ILLISIBLE: The XML is malformed
This code shows up when an electronic invoice is validated. Here is what it means, why it fires, and what to change in the file.
Why this code appears
The attached file is not valid XML: a tag is left open, a forbidden character slipped into the document, or the file is truncated.
How to fix it
Open the XML in an editor and look at the reported line. Common causes are a control character copied out of a database and an unescaped ampersand in a company name (& must be written &).
What it looks like in the file
These two snippets are replayed against our own checker on a complete invoice, every time the site is built. The first one raises this code, the second one does not.
What raises the code:
<ram:ID>2026-114
What to write instead:
<ram:ID>2026-114</ram:ID>
Where it happens
This check is ours, not a code from the standard: we do not cover enough of EN 16931 to borrow its numbers, and a misattributed official code would send you to fix the wrong field. It concerns XML.