Hi everyone, I would like to have a Java servlet that reads an XML file, determines the format of the data, creates a table in SQL Server 7.0 to accept the file and loads the file into the SQL Server table. Please tell me if this is feasible. If so, would give me some basic instructions on coding it? Greatly appreciate your help. Michael
Yes, it is feasable. Use an XML parser (I recomment Xerces www.apache.org) to parse your xml file. I prefer using SAX parsers over DOM, but that is mostly a personal preference. Put some data type cues in your xml so that you can quickly determine the data format (such as a data type tag or something). Use your content handler or read your DOM tree to create your SQL table. Java and XML is a really good book on the subject from Oreilly. Good luck.
- Chris Stehno, SCPJ
Joined: Jan 18, 2001
Chris, Thank you for the instructions. I will try what you said. If I have more questions, I may paste them again. Michael