I use "XmlFileLoader.getDocument(stdJDBCUrl, true)", but all I get are messages like the following printed to the log:
13:25:05,062 ERROR [XmlFileLoader] XmlFileLoader: File file:/home/dain/work/jboss/jboss-all/build/output/jboss-3.0.0beta2/tmp/deploy/home/dain/work/jboss/jboss- all/testsuite/output/lib/cmp2-commerce.jar/64.cmp2-commerce.jar!/META-INF/jbosscmp-jdbc.xml process error. Line: 10. Error message: Element "defaults" does not allow "should-break" here. 13:25:05,063 ERROR [XmlFileLoader] XmlFileLoader: File file:/home/dain/work/jboss/jboss-all/build/output/jboss-3.0.0beta2/tmp/deploy/home/dain/work/jboss/jboss- all/testsuite/output/lib/cmp2-commerce.jar/64.cmp2-commerce.jar!/META-INF/jbosscmp-jdbc.xml process error. Line: 10. Error message: Element type "should-break" is not declared. I like the messages, I just wish that at the end I could detect that the doc was not valid and throw a Deployment exception. Any ideas? -dain Scott M Stark wrote: > If you have the doc URL then use: > > public static Document getDocument(URL url, boolean validateDTDs) throws > DeploymentException > > else, create the document stream and call: > > XmlFileLoader(boolean validateDTDs) > public Document getDocument(InputStream is, String inPath) throws > DeploymentException > > xxxxxxxxxxxxxxxxxxxxxxxx > Scott Stark > Chief Technology Officer > JBoss Group, LLC > xxxxxxxxxxxxxxxxxxxxxxxx > ----- Original Message ----- > From: "Dain Sundstrom" <[EMAIL PROTECTED]> > To: "JBoss-dev" <[EMAIL PROTECTED]> > Sent: Sunday, March 03, 2002 10:13 AM > Subject: [JBoss-dev] XmlFileLoader and validation? > > > >>How can I know if there were no validation errors when loading a doc >>with XmlFileLoader? >> >>I want to throw a DeploymentException if jbosscmp-jdbc.xml is not valid. >> >>-dain >> >> >>_______________________________________________ >>Jboss-development mailing list >>[EMAIL PROTECTED] >>https://lists.sourceforge.net/lists/listinfo/jboss-development >> >> > > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development