Error Non-whitespace before first tag



Hello, the XML node seems to be validating a { that is not outside the data object, thus generating the error: Non-whitespace before first tag. Line: 0 Column: 1 Char: {
I tried to use the utf8 option in the Move Binary Data node but the error persists. Does anyone know how to solve this?

Information on your n8n setup

  • n8n version: 1.58.1
  • **Database (default: SQLite):Postgres
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):main
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):npm
  • **Operating system:Ubuntu


I discovered the reason for the error, this XML contains data with { how can I handle this type of file?

Hi @leomangueira,

It’s hard for me to troubleshoot without seeing what the content of the XML looks like, could you maybe share the specific XML string so I can take a look at what might be going on?

You can also try trimming the xml data with an expression e.g. {{ $json.data.trim() }}