0
Android 휴대 전화에서 웹 페이지를 읽고 아래 코드 샘플을 원합니다. 그러나이 코드를 사용하면 웹 페이지의 모든 항목을 가져옵니다. 하지만 웹 페이지에서 기사를 얻고 싶습니다. 나는 HTML 태그로 그들을 얻고 싶지 않다. 웹 페이지에서 기사 만 수신하려면 어떻게해야합니까? 당신의 기사를 쿼리하는 웹 사이트 (아마도 RSS 피드의 형태로) 텍스트 전용 콘텐츠를 포함하지 않는html 태그가없는 Android 폰에서 웹 페이지 읽기
import java.net.*;
import java.io.*;
public class URLReader {
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://www.oracle.com/");
BufferedReader in = new BufferedReader(
new InputStreamReader(oracle.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}