0

I have a flat file as input. I need to read the flat file line by line using Smooks. Can anyone please give me suggestions or sample code how to do it.

user1019072
  • 299
  • 1
  • 7
  • 17

1 Answers1

-1

Here is Smooks Config file (SmooksConfig_ForFlatFile.xml).

here is Input File (input-messages.txt) charles moulliard Male 43BE maxence dewil Male 30NL eleonor moulliard Female 12AD

Here is the java code: smooks = new Smooks("SmooksConfig_ForFlatFile.xml");

        FileOutputStream fos = new FileOutputStream("FlatFile_Output.xml");
        smooks.filterSource(new StreamSource(new FileInputStream("input-message.txt")), new StreamResult(fos));
Vishnu
  • 1