You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Han Ming Ong <ha...@chirpyfish.org> on 2002/02/26 03:02:33 UTC
1.4.4: Set validation using JAXP
I couldn't find this in the FAQ.
I'm using 1.4.4 and JAXP. I was trying to use SAXParserFactory's
setValidating() to ask the underlying Xerces parser to be validating.
Somehow that didn't work. I have to explicitly set it using
reader.setFeature("http://xml.org/sax/features/validation",
true);
where reader is an instance of XMLReader.
I am OK with doing it that way but I do want to have the flexibility of
swapping another parser for testing and thus prefer not to have parser
specific codes.
Anyone else have experience on this?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org