XML: replace some values with new values (based csv) and convert It back to (Original XML)

Hello friends,

I’d like some help with a task that I understand to be simple, but I haven’t been able to complete.

(I’ve looked at some topics on the subject, but honestly, none were simple to execute.)

What I want is this:

Scenario: I have a template XML file that already has its fields filled in. I need to replace some of these fields with new values. To do this, I’ll create a Loop with a second table of new values. Each row should result in a new XML output.

To simplify, I just want someone to help me with the REPLACE process of 1 of the values in the template with the new values. After the replacement, I need the output XML to be exactly the same as the original, meaning only the fields will be changed.

If someone could provide just one example, including the output, that would be great.

What is the best strategy?

Use xPath or regexRepalacer?

Goal: After the output XML file is generated, I will submit it to a website that reads it and generates a PDF with the payment slip.

“I thought about asking Gemini to do the work, but it will be hard, but I preferred to learn in KNIME. It would also be cool to create an LLM within KNIME, but I haven’t been able to start learning yet. I still find it difficult to understand (API configurations, prompts, vectors, etc.).”

*Even thought, I read something about XSLT node, and I think I will have to use it.*

This is my workflow, but I’m thinking if the best approach would be xml to string, then regex Replace, but, some XML has same tag name, but ident in another group, and replace could, replace both values.

XML_REPLACE.knar