一、问题描述
在项目中使用了XML解析,如果加入了其他了xfire 等其他xml解析包的话,使用org.w3c.dom.Node下的getTextContent()方法会出现The method getTextContent() is undefined for the type Node 提示

二、解决方法
project-->properties->java build path-->order and export

把JRE System 提升到顶部既可
本文描述了一个关于XML解析的问题:当项目中同时使用了多种XML解析包时,尝试调用org.w3c.dom.Node下的getTextContent()方法会遇到未定义错误。文章提供了简单有效的解决方案:通过调整项目的JRE系统库顺序来解决此问题。
一、问题描述
在项目中使用了XML解析,如果加入了其他了xfire 等其他xml解析包的话,使用org.w3c.dom.Node下的getTextContent()方法会出现The method getTextContent() is undefined for the type Node 提示

二、解决方法
project-->properties->java build path-->order and export

把JRE System 提升到顶部既可
1078
1527

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