0

I'm developing an Android app that fetches a web page from a website which i will latter process it to get only specific data. The web page is plain html, i've managed to get the content i want from it by using string search and indexes but it's not an elegant way to do so.

Edit:I don't have any control over the website.

Any suggestions?

Carlos Ferreira
  • 432
  • 5
  • 15

2 Answers2

1

You could probably use an HTML Parser. This SO Question is answering about which HTML Parser you could use. By using the Parser, you could walk through the HTML Structure and get the info that you need.

If this is your own website, you might want to consider creating a Service Interface on top of the data using REST API Design and returning JSON data format.

Community
  • 1
  • 1
momo
  • 21,233
  • 8
  • 39
  • 38
0

Do you have any influence over the web page itself? If so, why not just do simple http requests and use POST and GET? If not, you're probably stuck with what you've got.

Pocket Universe
  • 1,428
  • 1
  • 9
  • 9