私はアンドロイド開発の初心者で、ウェブビューに RSS フィードを表示しようとしています。これらはプレーン テキストとして表示され、フィードの詳細とともに html タグが表示されます。ユーザーエージェントを無駄に切り替えようとしました。正規表現を使用してフィードをクリーン/適切な html 形式で表示することは可能ですか? どんな助けでも大歓迎です。
ウェブビューをロードする方法
try{
newsfeed.loadUrl("http://feeds.feedburner.com/GoldMoneyGoldResearch");
}catch (Exception e){
e.printStackTrace();
}
このようなことは可能ですか?この効果を得るにはどうすればよいですか?
try{
newsfeed.loadUrl("http://feeds.feedburner.com/GoldMoneyGoldResearch").replaceAll("<[^>]*>", "");
}catch (Exception e){
e.printStackTrace();
}
編集
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_darn);
newsfeed = (WebView) findViewById(R.id.webView1);
try{
String content = newsfeed.loadUrl("http://feeds.feedburner.com/GoldMoneyGoldResearch").toString();//<--trying to parse rss feed to string
newsfeed.loadData("<html>" + content + "</html>", "text/html", "utf-8");
}catch (Exception e){
e.printStackTrace();
}
}