final code Need transform text output to CSV and XML