Is there a way in Java to validate against XSD without SAX?



I'm looking at the wikipedia article about SAX (Simple API for XML) and I'm a little puzzled by this drawback of SAX parsing: (which conspicuously lacks a citation)



Virtually any kind of XML validation requires access to the document in full.



I'm finding that hard to believe - for example the javax.xml.validation.Validator object throws SAX exceptions all over the place.


Is there a way to validate against an XSD in Java without using a SAX parser? If not, can you validate an XML document in Java without using a SAX parser - perhaps using something other than XSD?


No comments:

Post a Comment