You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by dhivya shan <dh...@yahoo.com.INVALID> on 2018/06/14 20:03:06 UTC

XML to JSON

I'm breaking my head for the past 2 days.
I successfully installed nifi1.6.0
Trying to read attached XML file (it is in a website - also I tried downloading to the pc)
I tried all kind of processors.
From the attached XML file (for every news article rss feed) - i've to pull out title, link, date and section for each of the website  and post a JSON document with UUID as file name.
Can you help me out?
ThanksShan

Re: XML to JSON

Posted by Mark Payne <ma...@hotmail.com>.
Shan,

I have a flow (template attached) that does something similar. This flow reaches out to several
different news feeds (RSS feeds from British, American, Mexican, and French news sources),
translates the non-english ones into English, and then splits the feed into individual records
(instead of a collection of several records per flowfile), then searches for the presence of keywords
and for any RSS entry that contains those keywords, it extracts the Link and Title. It then fetches
the contents of the link and writes that to disk.

Hopefully this will help you to get what you need! One big caveat, though! It does depend on a couple
of processors that are not present in 1.6.0. You'll need to build from master in order for it to work.

Thanks!
-Mark





On Jun 14, 2018, at 4:03 PM, dhivya shan <dh...@yahoo.com.INVALID>> wrote:

I'm breaking my head for the past 2 days.

I successfully installed nifi1.6.0

Trying to read attached XML file (it is in a website - also I tried downloading to the pc)

I tried all kind of processors.

From the attached XML file (for every news article rss feed) - i've to pull out title, link, date and section for each of the website  and post a JSON document with UUID as file name.

Can you help me out?

Thanks
Shan
<slashdot.xml>