Node“getTextContent() is undefined for the type Node”处理办法

最近一个项目在MyEclipse导入后总是报getTextContent() is undefined for the type Node错误。

QQ截图20170316115936

经过查找原来是因为Node类为JDK中自带的(org.w3c.dom.Node),出现这个问题是因为项目中引入了xml-apis.jar包,导致Eclipse去找xml-apis.jar中的类,最终冲突而报错。

解决办法有两种:

1、删除掉xml-apis.jar包即可;

2、将项目的JAVA Build Path配置的“Order and Export”中将JDK的顺序排到xml-apis.jar上面即可;

QQ截图20170316120618

原文地址:https://www.cnblogs.com/xusweeter/p/6558809.html