The following exception was encountered when processing XML data

If a string used in a dataset column contains a control character, the following error will occur:

A screenshot of a computer

Description automatically generated

If you click Share Details and then select Copy error details the XML document containing the error will be copied to the clipboard. After that, you need to open an editor that can show control characters (for example, Notepad++) and paste in the text:

Here you can see that the column “Name” contains a string with the control character FS (ascii 28), which is not valid in an XML document.

After identifying the source of the error, you can edit the string in Business Central and remove the control character.