Exception in thread "main" java.lang.ClassCastException: org.dom4j.tree.DefaultAttribute cannot be cast to org.jdom.Attribute at Dom.Dom4jTest.main(Dom4jTest.java:30)
Exception in thread "main" java.lang.ClassCastException: org.dom4j.tree.DefaultAttribute cannot be cast to org.jdom.Attribute
at Dom.Dom4jTest.main(Dom4jTest.java:30)
2016-07-11
用dom4j的時(shí)候聲明了jdom的Attribute變量,選擇Attribute的時(shí)候記得要看清選dom4j的Attribute
2016-07-07
異常打印已經(jīng)說得很明顯了,org.dom4j.tree.DefaultAttribute 與org.jdom.Attribute類型不兼容,調(diào)整為同一種類型即可