日期:2014-05-16  浏览次数:20545 次

linux下jdom解析xml出错
问题:
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/