The method getTextContent() is undefined for the type Element

使用org.w3c.dom解析XML,有时可能会报错The method getTextContent() is undefined for the type Element/Node,这种情况可能是加入了其他的XML解析jar包。

解决方法如下:

  将Project->Properties->Java Build Path->Order and Export->JRE System Library移动到顶部(Top)

      

 

posted on 2016-07-19 19:04  禁忌夜色  阅读(894)  评论(0编辑  收藏  举报

导航