Best way to parse some HTML code in Android [closed] - java

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm currently developing a small application for my parents' restaurant. The restaurant has a webpage where the clients have a private zone where they can see the status of their account after they log in.
Let's assume I log in succesfully and now I can see that private HTML after login. There, i'd like to parse some data.
My question is, I think, quite simple. I know I can use JSOUP for this task but I can also manage to do it by using Strings and Substrings.
Which method is best and why? I've looking for a while and I can't decide which to use.
Thanks in advance,
Alex

Jsoup is a better method, it is a library built for html parsing.
Using strings and substrings can be very error prone and lead you to writing a lot of code for something an html parsing library can already do easily.

Related

How would I go about storing data with this kind of app? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have this idea for an app (mainly for personal use) to write down homework or upcoming project due dates and save them, and maybe add alarms to help me not procrastinate.
My question is: how would I store assignments? I never actually made an app that stores user input so I don't know where to start. From what I know I can either start up an SQL db or use Shared Preferences which I'm not familiar with both. So my question is what's the advantages and disadvantages of either?
If you are using bulk amount of data and you want to store it in ordered way then you can use SQL db. In SQL db you can also do indexing.
In case of small data storage you can use shared preferences.
In your case you should definitely use db.
Check the official documentation, you will get more clear idea :
http://developer.android.com/guide/topics/data/data-storage.html

JSON Parser Project [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm thinking about starting an open source JSON parser library in Java for fun and coding practice. Would this be useful for people? Would this have more adoption than an XML parser?
There has always been a fair amount of backlash against XML, but this has really heated up since JSON became popular. A lot of people want to throw XML out the window and use JSON for everything, and for many problems, this is a reasonable thing to do. JSON and XML have many similar properties, but XML has some tricks up its sleeve that JSON can't yet match. you can find more useful answer in the below JSON and XML comparison and https://stackoverflow.com/questions/3536893/what-are-the-pros-and-cons-of-xml-and-json

Generic Web Parser [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am trying to scrape data from two websites. I want to build a generic web parser to scrape those website. I need a generic parser because i might need to parse additional websites in the future. I want to parse the websites using java and store specific data in MySQL. What are the steps I should take? Can anyone guide me in this?
I've done this same thing for scraping the web using java and building a parser is an absolute nightmare, there are so many more things to consider that you realize at the start.
Use jSoup. It is sooo easy, and leaves you time to enjoy the finer things in life.

Language best for Text Processing [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am working on Text Processing Project. Where I need to do many operaition on text provided to me. Like finding substring in the text (Using Regex), deleting garbage text (Using Exact or Regex match), Splitting Text into multiple parts. Currently I am using Java for this purpose. Just want to understand is Java most suitable language for such things or I should use some other language.
It's opinion based, but I'd say one language is as good as another for this. There are some great java libraries for text parsing. I've been using the Guava Joiner, Splitter and Charmatcher classes a lot recently for similar things. https://code.google.com/p/guava-libraries/

how to extract author details from pdf using java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have 1000s and 1000s of PDF articles from which I need to extract only author name and his relevant details like address and email ID and whatever provided inside the PDF (I mean the content inside). I don't want to do this by getting the details associated with the metadata of the PDF. Since I tried that where I end up with only less details like author name, title and some other usual details which I do not need at all.
I have gone via all APIs in internet, but still I did get the solution. I need to do it in Java.
I think you can't get it directly from any library.
Use iTest library for reading pdf. Once you are able to read text find the Author using regular expression.

Categories

Resources