Klarfile

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 &).

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.

Check my invoice All rejection codes