SAX Parser and XML Schema (XSD) validation
Which Java XML libraries can do SAX-based parsing and validation against an XML Schema (XSD) at the same time?
I'm really looking for the most efficient solution for reading and validating large XML files.
bonus points if you can provide sample code开发者_如何学编程.
Xerces which is part of the Sun JDK can do validation. You can see in the docs.
As suggested by Robert , Xerces provides SAX-based parsing and XSD validation.
You can checkout example at :
http://www.herongyang.com/XML-Schema/Xerces2-XSD-Validation-with-SAXParser.html
精彩评论