xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joeseph Zeldin <...@togetherlab.com>
Subject Re: [Bug 1051] Changed - Validation not being done by parser
Date Thu, 05 Jul 2001 13:57:18 GMT
Hello,

And how to call XERCES to validate XML by XSD Schema? Or am I dummy? I
tried to it in the same way, but was really confused.

bao>   I'm using Xerces 1.2.3.
bao>   Is this the proper way to activate validation?  Or is this a bug?

 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
 factory.setValidating (true);
 factory.setNamespaceAware(true);
 factory.setAttribute ("http://apache.org/xml/features/allow-java-encodings", Boolean.TRUE);
 factory.setAttribute ("http://apache.org/xml/features/validation/schema", Boolean.TRUE);
//   factory.setAttribute ("http://apache.org/xml/features/validation/schema-full-checking",
Boolean.TRUE);
 DocumentBuilder domParser = factory.newDocumentBuilder ();
 domParser.parse (xmlFileName);


-- 
Best regards,
 Joeseph                            mailto:joe@togetherlab.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Mime
View raw message