MohamedRejeb / Ksoup

Ksoup is a lightweight Kotlin Multiplatform library for parsing HTML, extracting HTML tags, attributes, and text, and encoding and decoding HTML entities.
Apache License 2.0
376 stars 10 forks source link

Can we access position/index of opening and closing tags? #41

Closed rsktash closed 6 months ago

MohamedRejeb commented 7 months ago

I thinking of adding support for having access to the HTML tree, but for now this is only possible manually by adding a variable, and you can increment and decrement it on tag open and close. Also, you can even add a stack for the current tags. You can check this code here to have a better idea link

rsktash commented 7 months ago

Hi @MohamedRejeb I was planning to use it for multi platform compose html parsing. I've solved it using native functions with expect/actual function. Thank you!