Kanna icon indicating copy to clipboard operation
Kanna copied to clipboard

Moving from SwiftSoup

Open burf2000 opened this issue 7 years ago • 2 comments

So I want to use this library instead of SwiftSoup as it seems fast as ****

SwiftSoup has a function to remove all tags from a document and just leave the content doc.body()?.text()

Does this library have a similar feature?

burf2000 avatar Feb 16 '18 12:02 burf2000

A few years too late 😜. Just providing an example from a string

let html = "<html><body><h1>GitHub</h1></body></html>"
if let htmlDoc = HTML(html: html, encoding: .utf8) {
        onlyText = htmlDoc.text
}

krishjainx avatar Jul 16 '21 22:07 krishjainx

Might want to close this to make managing this library easier for you? @tid-kijyun

krishjainx avatar Jul 16 '21 22:07 krishjainx