问题:
linux下jdom解析xml出错:
[Fatal Error] :1:1476: Element type “nodeName” must be followed by either attribute specifications, “>” or “/>”.
net.sf.json.JSONException: nu.xom.ParsingException: Element type “nodeName” must be followed by either attribute
......
解决:
xml里encoding的值是GBK,jboss启动后要去读该xml,里边有中文,估计导致解析出错,查资料后将编码改为GB18030问题解决.
参考:
http://xieshaohu.wordpress.com/2011/02/12/element-type-nodename-must-be-followed-by-either-attribute-specifications-or/
linux下jdom解析xml出错:
[Fatal Error] :1:1476: Element type “nodeName” must be followed by either attribute specifications, “>” or “/>”.
net.sf.json.JSONException: nu.xom.ParsingException: Element type “nodeName” must be followed by either attribute
......
解决:
xml里encoding的值是GBK,jboss启动后要去读该xml,里边有中文,估计导致解析出错,查资料后将编码改为GB18030问题解决.
参考:
http://xieshaohu.wordpress.com/2011/02/12/element-type-nodename-must-be-followed-by-either-attribute-specifications-or/
本文介绍了一个关于Linux环境下使用JDome解析XML文件时出现的错误:元素类型必须后跟属性规范、'>' 或 '/>'. 错误原因是XML文件中的编码设置为GBK,在JBoss启动并尝试读取包含中文字符的XML文件时导致了解析错误。解决方案是将XML文件的编码从GBK更改为GB18030。
3279

被折叠的 条评论
为什么被折叠?



