xml file validation
I am validain开发者_运维技巧g a xml using following code snippet.
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
try
{
Schema schema = factory.newSchema(schemaFile);
Validator xmlValidator = schema.newValidator();
}
But I am receiving the following exception whne I am deploying in weblogic 11g server.
java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema-instance
When I am deploying same in jboss5.1 server. It giving no exception.
Can any one give nay suggestions please.
Thanks,
Narendra
Weblogic has problems with the XMLConstants.W3C_XML_SCHEMA_NS_URI it seems
as per the workaround given in this forum thread.
精彩评论