0

How can i display html values in textview in android. Sample output response is in this link: http://pastebin.com/KYMTKAss . Similarly i ve many classes and values. How can i fetch these html values into a string and display them in Textview. Please guide me.

Thanks.

2
  • Are you asking how to encode the Strings properly, or how to show HTML? Commented Dec 8, 2011 at 7:50
  • I need to parse the above html response and get class values. In the above attachments we have different classes and each class has value assigned to it. I need to get values of each class. How can i do that. Like for instance,<Div class=\"profile_pic_container\"> this class contains image. Like other class has message values, Name value. I need to get these values individually. Please guide me. Thanks Commented Dec 8, 2011 at 7:58

2 Answers 2

2

Have you tried with Html.fromHtml already?

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

3 Comments

yes. This is working but we pass one html data and get the response. When i have more that 1 html tag(HTML class) how can i differentiate each class value.
then you need a parser... as @sunil-kumar-sahoo says Jsoup is a good solution
0

You can parse HTML using JSoup. The jar is about 132k, which is a bit big, but if you download the source and take out some of the methods you will not be using, then it is not as big. Have a look on HTML Parsers

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.