Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison with https://github.com/MohamedRejeb/Ksoup #106

Open
ronjunevaldoz opened this issue Dec 16, 2024 · 2 comments
Open

Comparison with https://github.com/MohamedRejeb/Ksoup #106

ronjunevaldoz opened this issue Dec 16, 2024 · 2 comments

Comments

@ronjunevaldoz
Copy link

I would like to get an insight what are the cons/pros using fleeksoft/ksoup over ksoup.

@itboy87
Copy link
Collaborator

itboy87 commented Dec 16, 2024

I was migrating my Android project to Kotlin Multiplatform (KMP) when I started looking for an HTML parsing library. I came across MohamedRejeb/Ksoup at the time, but it didn’t meet my expectations. So, I decided to create fleeksoft/ksoup, which serves as a perfect port of Jsoup. Here are a few pros and cons that I’ve identified:

Pros of fleeksoft/ksoup:

  • Comprehensive Feature Set:
    fleeksoft/ksoup is a direct port of the Java library Jsoup, retaining its robust API design and full functionality. It supports a wide range of CSS selectors, various character encodings, and provides advanced classes like Document and Element for detailed HTML parsing and manipulation.

  • Extensive Testing:
    The library is supported by over 1,000 unit tests, including those from Jsoup, ensuring high reliability and stability.

  • Trusted by Industry Leaders:
    It is used by well-known companies such as Slack, Atlassian, and Square, highlighting its credibility and suitability.

  • Streaming API Support:
    Extensions are available for popular streaming libraries like kotlinx-io, okio, and korlibs, enhancing its versatility for a wide range of use cases.

Cons of fleeksoft/ksoup:

  • Slightly Larger Size (Unconfirmed):
    Due to its comprehensive feature set, the library might be slightly larger compared to minimalist alternatives. However, this has not been definitively measured.

  • Performance Comparison:
    Although fleeksoft/ksoup’s performance is generally comparable to competitors, there are certain scenarios where MohamedRejeb/Ksoup demonstrates slightly faster performance.

@itboy87 itboy87 pinned this issue Dec 17, 2024
@mxkmn
Copy link

mxkmn commented Dec 18, 2024

MohamedRejeb/Ksoup is a stupid lib for callbacks when opening or closing a tag, and even without the ability to filter and retrieve the tag's insides. It can only be useful if you don't know how to write string.substringAfter("<$tag").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants