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

Moving from SwiftSoup #180

Open
burf2000 opened this issue Feb 16, 2018 · 2 comments
Open

Moving from SwiftSoup #180

burf2000 opened this issue Feb 16, 2018 · 2 comments

Comments

@burf2000
Copy link

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?

@krishjainx
Copy link
Contributor

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
Copy link
Contributor

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

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

2 participants