XML Validation in Java: processContents=“lax” seems not to work correctly

大兔子大兔子 提交于 2019-12-03 15:12:31

According to the spec:

"It will validate elements and attributes for which it can obtain schema information, but it will not signal errors for those it cannot obtain any schema information."

So, when you use procesContents "lax", the validator cannot find a schema for the "invalidTag" and therefore ignores it, as per the spec.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!