<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: [NiFi] Combine FlowFile Attribute and Content in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Combine-FlowFile-Attribute-and-Content/m-p/131024#M43528</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/13727/harindar.html" nodeid="13727" target="_blank"&gt;@Harry &lt;/A&gt;&lt;P&gt;You should be able to simply use two ReplaceText processors in series to create the XML structure you are looking for:
&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8566-screen-shot-2016-10-14-at-82207-am.png" style="width: 1152px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22318iD28DD5BF9475FAF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8566-screen-shot-2016-10-14-at-82207-am.png" alt="8566-screen-shot-2016-10-14-at-82207-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;First replace text configured to prepend text to the binary content as follows:

&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8567-screen-shot-2016-10-14-at-82340-am.png" style="width: 1884px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22319i945C2259737DC439/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8567-screen-shot-2016-10-14-at-82340-am.png" alt="8567-screen-shot-2016-10-14-at-82340-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
and the second to append text to the resulting content from the above:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8568-screen-shot-2016-10-14-at-82542-am.png" style="width: 1608px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22320i3CFA0A3395E4DED5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8568-screen-shot-2016-10-14-at-82542-am.png" alt="8568-screen-shot-2016-10-14-at-82542-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;*** Note: if you hold shift key while hitting enter, you will create a new line in the text editor as shown in the above examples.

An example of the output from the above would look like this:

&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8569-screen-shot-2016-10-14-at-82756-am.png" style="width: 1426px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22321iFD8C53630796E7E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8569-screen-shot-2016-10-14-at-82756-am.png" alt="8569-screen-shot-2016-10-14-at-82756-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There you have the binary content between &amp;lt;flowfile-content&amp;gt; and &amp;lt;/flowfile-content&amp;gt;
&lt;/P&gt;&lt;P&gt;Now all you need to do is adjust the specific prepend and append values you need.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 09:26:43 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2019-08-19T09:26:43Z</dc:date>
    <item>
      <title>[NiFi] Combine FlowFile Attribute and Content</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Combine-FlowFile-Attribute-and-Content/m-p/131023#M43527</link>
      <description>&lt;P&gt;Im trying to create a xml structure which is required by an external application. The format that they require would be something like this &lt;/P&gt;&lt;P&gt;&amp;lt;root&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;attributeOne&amp;gt;&amp;lt;/attributeOne&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;attributeTwo&amp;gt;&amp;lt;/attributeTwo&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;flowfile-content&amp;gt;&amp;lt;/flowfile-content&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/root&amp;gt;&lt;/P&gt;&lt;P&gt;Im able to get the appropriate structure and the required attributes(passed as Parameters) using TransformXML processor.&lt;/P&gt;&lt;P&gt; However im not sure how to access complete flowfile-content (which is a binary) and append into the structure(inside flowfile-content tag).&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:51:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Combine-FlowFile-Attribute-and-Content/m-p/131023#M43527</guid>
      <dc:creator>harindar</dc:creator>
      <dc:date>2016-10-14T15:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: [NiFi] Combine FlowFile Attribute and Content</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Combine-FlowFile-Attribute-and-Content/m-p/131024#M43528</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/13727/harindar.html" nodeid="13727" target="_blank"&gt;@Harry &lt;/A&gt;&lt;P&gt;You should be able to simply use two ReplaceText processors in series to create the XML structure you are looking for:
&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8566-screen-shot-2016-10-14-at-82207-am.png" style="width: 1152px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22318iD28DD5BF9475FAF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8566-screen-shot-2016-10-14-at-82207-am.png" alt="8566-screen-shot-2016-10-14-at-82207-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;First replace text configured to prepend text to the binary content as follows:

&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8567-screen-shot-2016-10-14-at-82340-am.png" style="width: 1884px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22319i945C2259737DC439/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8567-screen-shot-2016-10-14-at-82340-am.png" alt="8567-screen-shot-2016-10-14-at-82340-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
and the second to append text to the resulting content from the above:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8568-screen-shot-2016-10-14-at-82542-am.png" style="width: 1608px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22320i3CFA0A3395E4DED5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8568-screen-shot-2016-10-14-at-82542-am.png" alt="8568-screen-shot-2016-10-14-at-82542-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;*** Note: if you hold shift key while hitting enter, you will create a new line in the text editor as shown in the above examples.

An example of the output from the above would look like this:

&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8569-screen-shot-2016-10-14-at-82756-am.png" style="width: 1426px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22321iFD8C53630796E7E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8569-screen-shot-2016-10-14-at-82756-am.png" alt="8569-screen-shot-2016-10-14-at-82756-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There you have the binary content between &amp;lt;flowfile-content&amp;gt; and &amp;lt;/flowfile-content&amp;gt;
&lt;/P&gt;&lt;P&gt;Now all you need to do is adjust the specific prepend and append values you need.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 09:26:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Combine-FlowFile-Attribute-and-Content/m-p/131024#M43528</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-08-19T09:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: [NiFi] Combine FlowFile Attribute and Content</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Combine-FlowFile-Attribute-and-Content/m-p/131025#M43529</link>
      <description>&lt;P&gt;@mclark&lt;/P&gt;&lt;P&gt;That certainly worked! Thank you so much.&lt;/P&gt;&lt;P&gt;One additional question related to this, is there any other way for me to access the flowfile-content within the XSLT file which i would use through Transform XML?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 21:41:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Combine-FlowFile-Attribute-and-Content/m-p/131025#M43529</guid>
      <dc:creator>harindar</dc:creator>
      <dc:date>2016-10-14T21:41:55Z</dc:date>
    </item>
  </channel>
</rss>

