long start = System.currentTimeMillis();
JAXBContext ctx = JAXBContext.newInstance(factbookxml.converter.schema.ObjectFactory.class.getPackage().getName());
marshaller = ctx.createMarshaller(); // no schema here!
Unmarshaller u = ctx.createUnmarshaller();
u.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(SQLBuilder.class.getResource("/factbook.xsd")));
Factbook doc = (Factbook) u.unmarshal(new File(WORKPATH, "factbook.xml"));
Properties props = new Properties();
props.put("user", args[3]);
props.put("password", args[4]);
Connection conn = DriverManager.getConnection(args[2], props);
SQLBuilder builder = new SQLBuilder(doc, conn);
String version = builder.version;
System.out.println("Version: " + version);
builder.build();
SQLRoundtripParser parser = new SQLRoundtripParser(conn, version);
parser.parseBack(formatDate(doc.getLastupdate()));
verify(Factbook.class, doc, parser.getFactbook());
System.out.println("Finished: " + (System.currentTimeMillis() - start) + " ms.");
}