Displaying XML data

Hello n8n experts!

The body response I receive from an HTTP call is an XML. I’m having issues to read it properly.

This is how the response looks like on Postman console:


On n8n this is how I see it when I select the “Schema” option:

But this is how it looks like wen I select the “JSON” option:

It’s a bug in the UI?
What would be a good way to turn the XML into a JSON I can work with?

Simplified workflow:

Information on your n8n setup

n8n version: 1.21.0
Database: postgresql 14.8
n8n execution mode: queue
running via: kubernetes
operating system: amazon linux

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

@Fortian , I think the HTTP Request node understands that there was an error (due to the status code 400) and thus tries to interpret it in its own fashion.

It would be nice to be able to configure HTTP Request in a way to ignore the error (status other than 2xx) and just to output the actual body that the request was replied with.

Meanwhile, I would advise to use the node with:

  • “Always Output Data” set to true
  • “On Error” set to “Continue”

Then in the next node(s) you would detect the presence of error property and extract the body from error.message using RegEx before working on it with XML node.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.