Simon Kitching wrote:
On Sun, 2004-09-12 at 10:23, Neil Blue wrote:
Hello,
I though there would be a lot of posts on this, but I can't seem to find any. Is there a way to turn on schema validation when parsing an XML config file with Digester 1.6.
To do validation, I would recommend creating your own parser instance, setting it up using the standard JAXP apis (or parser-specific APIs) then using the Digester constructor that takes a parser parameter - or call parser.parse(source, digester).
Yes, there are methods on the digester class to configure some parser features, but it seems more confusing to me to use these than to use *standard* apis for parser configuration.
Well, we should try to fix that if you think the method are useless (who did that?? ;-) ).
A good example on how schema can be used can be viewed here:
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/DigesterFactory.java?rev=1.6.2.2&only_with_tag=TOMCAT_5_0&view=markup
Thanks
-- Jeanfrancois
Regards,
Simon
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
