String expr = textArea1.getText();
XQueryParser parser = new XQueryParser(
new ByteArrayInputStream(expr.getBytes()));
parser.disable_tracing();
PrintVisitor dumper;
try {
XQueryModule module = parser.parse();
dumper = new PrintVisitor();
module.visit(dumper, null);
textArea2.setText(dumper.getResult());
} catch (Exception e) {
textArea2.setText(e.getMessage());
}
}