import java.io.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.w3c.dom.*; import java.sql.*; public class imp{ public static void main(String argumendid[]) throws Exception{ Document d=DocumentBuilderFactory.newInstance().newDocumentBuilder().parse("puu.xml"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection cn=DriverManager.getConnection("jdbc:odbc:baas5", "", ""); Statement st=cn.createStatement(); try { String alause="CREATE TABLE aadress2 (id_a int, aadress text)"; st.executeUpdate(alause); String mlause="CREATE TABLE riigid2 (id_r int, riigid text)"; st.executeUpdate(mlause); String ylause="CREATE TABLE seosed2 (id_s int, id_r int, id_a int)"; st.executeUpdate(ylause); } catch(Exception p) { System.out.println("Baasid olemas: "+p.getMessage()); p.printStackTrace(); } //paneb andmed andmebaasi NodeList aadressid=d.getFirstChild().getFirstChild().getChildNodes(); for(int i=0; i