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:[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]