Compilation error in Node.getTextContent for jdk 6

maven添加dom4j後,原正確代碼編譯報錯:

java Source code not compiling with jdk 6.

 import org.w3c.dom.Node;
 Node node = list.item(0);
 String txtContent = node.getTextContent();

getTextContent() not found in the jdk 6

解決方法: -> project properties | Java Build Path | Order and Export tab, selected the JRE (which was at the bottom of the list) and clicked the "Top" button to 移動到頂部.
發佈了58 篇原創文章 · 獲贊 4 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章