Assigning group value to items in the group (groupby)

I’m rather new to Knime and I am running in a issue.

I have an XML file that I’m reading in with an XML reader, afterwards I’m using Xpaths to get the information I require.
xpath ArticleGroup: /Webshop/ArticleGroups/ArticleGroup
xpath Articles: /Webshop/ArticleGroups/ArticleGroup/Articles/Article
xpath text: /ArticleGroup/Specifications/Specification/Header

Each Articlegroup contains one Header with text and multiple Articles.

I want to be able to add the Header of the xpath text to each Article that is in the same ArticleGroup. I have tried to do this using Group by nodes and I do think this should be the solution, but I’m struggling to make it work. I feel like my ArticleGroup and each article in it should both have the same identifier to make a Groupby work.

below a piece of my XML file to show the structure

<Name>...</Name>
<Specifications>
<Specification>
<Header>**Text That I want.**</Header>
</Specification>
</Specifications>
<ArticleSubGroups> </ArticleSubGroups>
<Articles>
<Article id="3526445" position="1">
...
</Article>
<Article id="3526446" position="2">
...
</Article>
<Article id="3526447" position="3">
...
</Article>
<Article id="3526448" position="4">
...
</Article>

Hello @Mapijs ,
Welcome to the KNIME Community!
Would it be possible for you to share the workflow?

Thanks,
Sanket

2 Likes

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