ksoup icon indicating copy to clipboard operation
ksoup copied to clipboard

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

Open ronjunevaldoz opened this issue 1 year ago • 3 comments

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

ronjunevaldoz avatar Dec 16 '24 05:12 ronjunevaldoz

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 avatar Dec 16 '24 13:12 itboy87

MohamedRejeb/Ksoup is a limited 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").

mxkmn avatar Dec 18 '24 10:12 mxkmn

@mxkmn Sorry, I updated your comment because the word ‘stupid’ was offensive, so I removed it.

MohamedRejeb/Ksoup is a limited 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").

itboy87 avatar Jan 04 '25 11:01 itboy87