Java Xml验证 [英] Java Xml Validation
本文介绍了Java Xml验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我想通过架构(xsd)来验证xml。首先,我正在使用SchemaFactory。问题是,如果我在Windows中运行代码一切正常,但如果我在Linux中运行它有一个错误。失败的代码如下:
展开 | 选择 | Wrap | 行号
解决方案
我不知道它为什么没有也不行;一件小事:你导入了正确的
XMLConstants课吗?有两个,你需要javax.xml中的一个。
对不起,我不能再帮你了。
亲切的问候,
Jos
请不要双重发帖;我删除了你的其他相同的线程。谢谢。
亲切的问候,
Jos
我检查了Sun的bugbase并找到了这:
http:// bugs.sun.com/bugdatabase/view...bug_id=5026581
事实上,我阅读了与搜索术语SchemaFactory相关的所有错误。 ,
a显示出惊人数量的错误;我的猜测是,b / b
的最佳动作是升级到Java 1.6
亲切的问候,
何
hello,
I want to validate an xml by means of a schema (xsd). To do that first of all I′m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in Linux there is an error. The code that fails is the following:
Expand|Select|Wrap|Line Numbers
解决方案
I don''t know why it doesn''t work either; one little thing: did you import the correct
XMLConstants class? There are two of them and you need the one in javax.xml.
Sorry I can''t help you any further.
kind regards,
Jos
Please don''t double post; I removed your other identical thread. Thanks.
kind regards,
Jos
I checked Sun''s bugbase and found this:
http://bugs.sun.com/bugdatabase/view...bug_id=5026581
As a matter of fact I read all the bugs related to the search term "SchemaFactory",
a frightening number of bugs were shown; my guess is that the best action to
take is to upgrade to Java 1.6
kind regards,
Jos
这篇关于Java Xml验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取
|
15天全站免登陆