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.
Asked
Active
Viewed 353 times
1 Answers
-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
-
Content of SmooksConfig file
-
Contents of input-message.txt charles moulliard Male 43BE maxence dewil Male 30NL eleonor moulliard Female 12AD – Vishnu May 01 '15 at 16:36