@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...