K
K
kirawa2014-05-04 10:59:21
Android
kirawa, 2014-05-04 10:59:21

How to parse this resource?

static.feed.rbc.ru/rbc/internal/rss.rbc.ru/rbc.ru/...

public class NewThread extends AsyncTask<String, Void, String> {
        Document doc;
 
        @Override
        protected String doInBackground(String... arg) {
            String url = "http://static.feed.rbc.ru/rbc/internal/rss.rbc.ru/rbc.ru/mainnews.rss";
            try {
                 doc = Jsoup.connect(url)
                        .parser(Parser.xmlParser())
                        .get();
            } catch (IOException e) {
                e.printStackTrace();
            }
        
            return null;
        }
 
        @Override
        protected void onPostExecute(String result) {
 
           
           textView.setText(doc.toString());
        }
    }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel K, 2014-05-04
@PavelK

You either freelance, or at least start writing an analysis and ask specifically what doesn’t work.
So far it looks like "write for me".

K
kirawa, 2014-05-04
@kirawa

Well, I want to get all the xml and display it, For example, from here String url = " www.omdbapi.com/?i=tt1285016&r=xml "; I get everything but from there I don’t.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question