Hi @Thiemo.Kellner , you could give these components a try.
and
I have just written them as it seemed like a “nice idea” and they are based on another component from a few days back. They borrow the flow variable “tag” syntax described in the Text View node documentation
Basically, if you have your three variables “xpath first part”, “type” and “xpath name part”, you can create a further string variable based on these by using the Dynamic Variable Creator and giving it the value:
$$["xpath first part"]$$["type"]$$["xpath name part"]
Alternatively, if you have may such variables to process, you can create them all using a variable creator with the above syntax, and pass them to the Dynamic Variable Replacer (Multi-Variable)
A workflow giving a simple demo is available here:
The main downside to the components is going to be performance. If you were needing to perform this replacement in a loop containing a large number of rows, then executing the components each time would be dramatically slower than coding the replacement as you have already done with a java snippet. There will always be that trade off between dynamic and bespoke code. However, this may be of interest depending on your use case.
They are new, so you’ll need to check they work for you, and if you do give them a try, please let me know if you encounter any issues, or have any suggestions for improvement.