I know I can validate xml-file when I use sax. But can I validate when I use Stax?
There is no standard way to do this. However, there's an API extension called StAX2 which support validation using Sun's MSV (multi schema validation). I would recommend to use the Woodstox StAX2 implementation.
http://woodstox.codehaus.org/