Add data to XML file

Hello Everyone !

We are struggling on Knime to add some data to an existing XML file.
We would like to add some tags with data to each parent IDs.

image

The data to upload as an example is this:
image

Final outcome of the xml would be this:
image

Please find the knime project. I removed all the “after merge” as honestly it was not working. Can someone help please ???

KNIME_FAO_SITG_2.knwf (93.5 KB)

Thanks in advance !

Hi @svenker,

and welcome to the Knime community. There are a few options available but the most straight forward is to create XML from the column which you did already, append and merge the XML columns and then use XSLT to fix the structure

Here is the workflow:

Best
Mike

2 Likes

Thanks Mike. Really nice support !
I am impressed it works !

One last point, I wanted to integrated it back to my original XML (in the project shared) and not only the “SchemaData”. Can you help please ?
I tried but I don’t get it to work as expected…

Glad you are happy with the solution. Here is the updated version. Please note that there might be duplicated nodes like “CHF”.

If that is the solution you can proceed working with, I’d appreciate if you can mark it as the solution.

PS: I can not believe you bought me not just one but three coffees :tada: Not certain if you saw my reply. Since you have been the first, I‘d like to show my gratitude for your surprise. If you need anything else, ping me or send me an email to info@atmedia-marketing.com … thanks again, you made my day :grin:

Cheers
Mike

1 Like

Thanks for your support. I still don’t get what I am looking for because I have two files one with a big XML with many “parcelle” and another table with only a few “parcelle”. I would like to add the data from the table to the big xml file if it finds a matching parcelle.
I can share you another file but cannot share it on the forum as such. Let me know how to proceed please…
Thanks !
Sam