use of com.sun.xml.xsom.impl.util.SchemaWriter in project atlasmap by atlasmap.
the class Dumper method main.
public static void main(String[] args) throws Exception {
XSOMParser reader = new XSOMParser();
// set an error handler so that you can receive error messages
reader.setErrorHandler(new ErrorReporter(System.out));
// DomAnnotationParserFactory is a convenient default to use
reader.setAnnotationParser(new DomAnnotationParserFactory());
try {
// the parse method can by called many times
for (int i = 0; i < args.length; i++) reader.parse(new File(args[i]));
XSSchemaSet xss = reader.getResult();
if (xss == null)
System.out.println("error");
else
new SchemaWriter(new OutputStreamWriter(System.out)).visit(xss);
dump(reader.getDocuments());
} catch (SAXException e) {
if (e.getException() != null)
e.getException().printStackTrace();
else
e.printStackTrace();
throw e;
}
}
Aggregations