How to conditionally use XML attribute values in n8n workflows?

Hi, I’m working with XML data in n8n and I can parse element values without issues.
But I also need to use XML attributes inside workflow logic.

Example XML:

<pass_return_code>123</pass_return_code>

What I want to achieve:

  • Read attribute abc="true"
  • If abc is true, continue workflow
  • Otherwise, stop or go to another branch

Is there a built-in way to parse attributes directly into JSON fields in the XML node,
or should I handle this in a Function node using JavaScript?

Would love to hear how others are handling attribute-based conditions in workflows!

have a nice dat~

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