can any1 recommend a library for html text strings...
# compose
m
can any1 recommend a library for html text strings ?
b
kotlinx.html?
Are you after generating html or parsing html?
m
parsing xml
<b>SomeText</> other text
b
I'm not aware of any kotlin-first HTML parsers out there.
You could try kotlinx.serialization with https://github.com/pdvrieze/xmlutil though
m
this is compose channel. What i need is a text composable that parses xml strings into annotated strings. I’m sure some1 already has sth like that
b
I see. Your question could be a bit more clearly phrased then 😄 What you're after is a library for parsing rich text.
m
ya sorry. This is compose channel so i would assume this was what i was looking for. What you suggested is kinda outside compose 😛 more related to kotlin
b
Indeed. I answered your question without #compose in the context.
c
If you're not completely bought-in to XML as the "annotated string" format, you could try my library Thistle as an alternative syntax
m
ya. but i already have xml annotated string. I cannot change atm unfortunatly
m
@myanmarking Just out of curiosity. In which context do you use “atm”. In my context this stands for Air Traffic Management.
m
i just use atm to mean ‘at the moment’ 😛
🙃 1
b
AnTiMatter? 😀
m
aha
g
I never heard of ready to use solution, also really depends on what kind html you have. Probably this article will be useful, it shows how to create simple markdown support, which looks similar, also it easier for html/xml than for markdown https://www.hellsoft.se/rendering-markdown-with-jetpack-compose/