Java で小さなデスクトップ アプリケーションを開発しています。XML ファイルからデータを読み取る必要があるポイントに遭遇しました。これは、Dom4j ライブラリを使用しているためです。コーディング中に次のエラーに直面しています。このエラーを解決するために誰かが私を導くことができます:
public void FromXML(String sXMLFileURI)
{//Reads the XML File and Stroe Data in Calling Object
Document document = getDocument( sXMLFileURI );
String xPath = "myXpath";
List<Node> nodes = document.selectNodes( xPath );//This line gives the followiing error:
//error "incompatible types
//required: java.util.List<org.dom4j.Node>
//found: java.util.List<capture#1 of ? extends org.dom4j.Node>"
for (Node node : nodes)
{
//some processing here
}
}