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

Allow for converting a Document back to String #70

Open
cook-f opened this issue Feb 23, 2022 · 1 comment
Open

Allow for converting a Document back to String #70

cook-f opened this issue Feb 23, 2022 · 1 comment

Comments

@cook-f
Copy link

cook-f commented Feb 23, 2022

Haven't found a convenient way to do this yet I'm afraid, would be much appreciated

@Eloitor
Copy link

Eloitor commented Jul 22, 2022

I'm also interested in this. I tried to strip comments of an html file, and I don't know how to turn the internal representation back to a String. Here is what I tried:

let _doc = Document::from_read(html.as_bytes())?;
let _find_nodes = _doc.find(Not(Comment));
let _iter_nodes = _find_nodes.into_selection().into_iter();

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