Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Nifi: Create a list of elements in same xml tag

Highlighted

Nifi: Create a list of elements in same xml tag

New Contributor

I am very new to Nifi and just started using.

Now, I am trying to extract all elements in same tags and combine them as a list and then add to the flowfile as a flowfile attribute. But, I cannot figure out the way to achieve it.

Here is the sample input and output of what I want to do


---Input---

<?xml version="1.0"?>

<body>

<value>12</value>

<value>14,10</value>

<value>45</value>

<value>12,26</value>

<value>32,14</value>

</body>


---Output (Attributes)---

Value

[12,[14,10],45,[12,26],[32,14]]