EncodingDeclRequired

The encoding declaration is required in the text declaration.

Notice! This page describes the nature of the error using a hypothetical example and not the erroneous data of the input test file. You should however be able to apply this information to your error case.

General description of the error:

The format of the error message: The encoding declaration is required in the text declaration.

Error description in schema standard: https://www.w3.org/TR/xml/

Meaning of the error: XML declaration is not valid and service is not able to locate mandatory encoding information.

Possible causes for this error:

  • XML declaration is missing encoding declaration
  • Invalid attributes are given in XML declaration. Only version, encoding and standalone are allowed
  • Duplicate attributes given in declaration

Example

<?xml version="1.0" encoding="UTF-8" lang="en"?>

Error message: The encoding declaration is required in the text declaration.

How to fix: Remove invalid attributes so that only version and encoding (and optionally standalone) remain.

<?xml version="1.0" encoding="UTF-8"?>