// unmarshal a file. Just like you've always been doing.
Object o = context.createUnmarshaller().unmarshal(new File(fileName));
// valdiate it. Again, the same procedure regardless of the schema language
context.createValidator().validate(o);
// marshal it. Nothing new.
context.createMarshaller().marshal(o,System.out);
}
}