开发者

xml file validation

开发者 https://www.devze.com 2023-01-27 04:35 出处:网络
I am validain开发者_运维技巧g a xml using following code snippet. SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消