I'm developing a server that should be able to export it's data to XML as well as import it again (from XML). I have a standard format DTD which the XML-file should comply to. How should I write to the XML-file and read it in? (using JDK1.4) What tools/APIs should I use? (SAX? DOM? Other?) /Andreas
Balaji Loganathan
author and deputy
Bartender
Joined: Jul 13, 2001
Posts: 3150
posted
0
Originally posted by Andreas Johansson: I'm developing a server that should be able to export it's data to XML as well as import it again (from XML). I have a standard format DTD which the XML-file should comply to. How should I write to the XML-file and read it in? (using JDK1.4) What tools/APIs should I use? (SAX? DOM? Other?) /Andreas
the answer for two of your question is Using JDBC to extract data into XML and Using JDBC to insert data from XML into a database you can search "dom or sax" in this forum to get some results.Its also depends on your business criteria, if you could explain more about your XML ,DB structure,then someone may give you some suggestiosns Regards Balaji
Hi! Thanks for your reply! I have gazed through the examples but they are too tightly coupled to the database. I want it independent from the database structure. I understand that DOM and SAX are the predominant techniques but which one should I use? What are their benefits and drawbacks? The XML-files has to conform to LISAs (Localisation Industry Standards Assocation) TBX (TermBase eXchange) DTD-format and the server should be able to both read and write those files. The XML-file is only intended for importing of 3rd party data in this format and exporting the data from the server so that others can use it. The files will never be modified, they are merely data exchange. Regards Andreas
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.