Support Questions

Find answers, ask questions, and share your expertise

Hi guys, Is there any process where i can make my XML File to CSV File? Thanks.

New Contributor
 
2 REPLIES 2

Guru

@Saurabh Bidwai

Pierre Villard wrote an article about working with XML documents in NiFi here:

https://pierrevillard.com/2017/09/07/xml-data-processing-with-apache-nifi/

At the end of the article he references NIFI-4366 regarding the future creation of XML Record Reader/Writers. Once implemented, all you would need to do is use a ConvertRecord processor with an XML Record Reader and a CSV Record Writer to do the desired conversion.

I wrote an HCC article about ConvertRecord here:

https://community.hortonworks.com/articles/115311/convert-csv-to-json-avro-xml-using-convertrecord-p...

I created an groovy processor that is using an XSD as the baseline for converting the XML file to CSV

You can read about it here XML to tables (xml2csv) with NiFi and Groovy Part 2 of 2

And you can access the source code here nifi-xml

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.