Not a valid value of the atomic type (cvc-datatype-valid.1.2.1)

The message

libxml2 (Python lxml, PHP, xmllint, this site):

Element 'A': 'x' is not a valid value of the atomic type 'xs:int'.

Java / Xerces:

cvc-datatype-valid.1.2.1: 'x' is not a valid value for 'integer'.
cvc-type.3.1.3: The value 'x' of element 'A' is not valid.

What it means

The text of an element or attribute does not fit its built-in XML Schema type — a number that is not a number, a date in the wrong format, a boolean written as yes.

Typical causes

Example

Schema:

<xs:element name="TradeDate" type="xs:date"/>

Document:

<TradeDate>19.10.2026</TradeDate>   <!-- must be 2026-10-19 -->

How to fix it

Format the value as the type requires. Common formats: xs:date 2026-10-19, xs:dateTime 2026-10-19T14:30:00 (optionally with Z or +02:00), xs:decimal 1234.56, xs:boolean true. If the value is genuinely unknown, omit an optional element rather than leaving it empty.

Find every occurrence at once

Load your XML file and its schema in the XML Online Viewer: it lists all validation errors with line, path and the surrounding lines, jumps to each one in the tree, and exports the list to Excel to hand to whoever produces the file. The schema is detected from xsi:schemaLocation when the document names it.

Other errors: all XML validation errors explained.

Validate your XML file