I don't know this is the right forum to raise this query
Kindly give some idea how to design this solution:
How do a single Java program will process data different text file format for same business function.
Client will send thier own text file with data in the format they wish, we can not dictate about single uniform text file format
We don't want to change the Java program for every clients.
Is XML file are the answer? But still as XML files changes our Java programs has to equally change
Can we maintain different client text file formats in a table and then process?
Can any one suggest a better solution design / pattern / logic to this scenario?
How about an "adapter" custom made for each format which converts the text file into a standard form for the rest of the processing.
I actually do this sort of thing with exam question documents. Adding a new input type just involves coding one new class which implements my adapter interface. I create an instance of the adapter using Class.forName() so the main program does not have to be recompiled, it just needs to read the names of classes it can use as an adapter.
XML as a standard form would only be appropriate if the document structure controls processing and you need to store the converted document.