我用Java编程,我正在使用DOM解析器。
我注意到
之间存在差异org.w3c.dom.Node
和
Node
但我不知道那是什么区别。
当我尝试调用一个类型为参数的方法时,我想出来了: org.w3c.dom.Node 。
我输入了节点参数,我接受了以下错误:
Exception in thread "main" java.lang.ClassCastException:
com.sun.org.apache.xerces.internal.dom.DeferredTextImpl cannot be cast to javax.xml.soap.Node
at elementchildren.ElementChildren.main(ElementChildren.java:50)
Java Result: 1
请你帮帮我?
答案 0 :(得分:5)