0

I am developing an android project.i want to access some portion of a webpage but how can i do so? which parser suits the best for this task and also how to use this parser. i use the following method to access the webpage but now want to parse this page

public void call_a_site()
    {   
            try
        {      
            Uri uri = Uri.parse( "http://www.dsebd.org/" );
            startActivity(new Intent(Intent.ACTION_VIEW,uri));

        }

    catch(Exception e)
    {

    }
}

plz help.. thanks

1

2 Answers 2

2

Check out the JSoup cookbook.

http://jsoup.org/cookbook/

This has a lot of good information in it and should be able to answer most of your questions.

You are probably looking for something along the lines of this: http://jsoup.org/cookbook/input/parse-body-fragment

Sign up to request clarification or add additional context in comments.

Comments

0

Jsoup library is the best option for Html parse.

Step 1: Download jsoup.x.x.x.jar download link
Step 2: Import in libs folder in IDE
Step 3: Set as library

Sample

        // Connect to the web site
        Document document = Jsoup.connect(url).get();
        // Using Elements to get the Meta data
        Elements description = document
                    .select("meta[name=description]");
        //Locate the content attribute
            desc = description.attr("content");

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.