我正在尝试从 RSS 提要中逐行阅读。
我不断收到这个错误;
java.io.FileNotFoundException: (Android App 的位置名称)
由于它被读取,从 RSS 提要并实际输出一些 xml,我看不出哪里可能有错误。有人遇到过这个问题吗?
URL url = new URL(urlText);
in = new BufferedReader(new InputStreamReader(url.openStream()));
String inputLine;
while ((inputLine=in.readLine()) != null) {
System.out.println(inputLine);
count++;
try{
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder= dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(inputLine);
doc.getDocumentElement().normalize();
}
catch(MalformedURLException e){
System.out.println(e.getMessage());
}
}