Use JBossXB :-)

On Tue, 2006-04-25 at 19:21 -0400, Emmanuel Bernard wrote:
> I want to activate XML Schema validation in a portable way.
> It doesn't seems to be possible.
> For Xerces I have to do
> 
> saxReader = new SAXReader();
> saxReader.setEntityResolver(entityResolver);
> saxReader.setErrorHandler( new ErrorLogger(file, errorsList) );
> saxReader.setMergeAdjacentText(true);
> 
> saxReader.setValidation(true);
> try {
>     saxReader.setFeature( 
> "http://apache.org/xml/features/validation/schema";, true );
> }
> catch (SAXNotSupportedException e) {
>     saxReader.setValidation( false );
> }
> 
> If I do not do the setFeature trick, I've got Error parsing XML: XML 
> InputStream(3) Document is invalid: no grammar found.
> 
> Does anyone know a portable way to activate schema validation (not dtd)?
> 
> 
> 
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> JBoss-Development mailing list
> JBoss-Development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jboss-development
-- 
xxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss Inc.
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to