Durga Roobini wrote: if have 50 xml file means 50 times I want to parse it ha? instead I want to parse it once,here I want to access third party api eg like(Eventful,eventbrite) which are getting events based on location,date etc.i have two xml files from events site I have parse once in servlet it should be generic.
You are not making much sense here.
How many files do you want to parse? 50 or 2?
Do you have XSDs for those XML files?
Why do you want to parse those files? Are you just looking for certain values from them or do you have to read all the data in the files? What are you going to do with the data that you are reading from the files?
Forget about servlets for now. Parse the files in normal
Java classes. You can then call those classes from the servlet.
What have you tried and where exactly are you stuck?