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

docs/example of searching and modifying the dom #363

Open
tcurdt opened this issue Mar 7, 2019 · 6 comments
Open

docs/example of searching and modifying the dom #363

tcurdt opened this issue Mar 7, 2019 · 6 comments

Comments

@tcurdt
Copy link

tcurdt commented Mar 7, 2019

I would be great to have an example or more explicit docs that shows how to search and modify the dom - or did I just not find that?

@SimonSapin
Copy link
Member

html5ever is really a parser (and serializer) that supports any data structure that implements the TreeSink trait. The rcdom module exists more to support html5ever’s own tests than for serious tree manipulation.

https://crates.io/crates/kuchiki is a proof-of-concept for providing more convenience APIs and plumbing a tree together with the parser and with CSS selector matching. But it also could use a lot more documentation, and I’m not actively working on it.

@tcurdt
Copy link
Author

tcurdt commented Mar 7, 2019

@SimonSapin Thanks for the quick reply. That sounds like bad news though. Bummer. Writing a complete DOM first seems a bit out of scope.

I guess I need to find another way for parse -> dom -> manipulate -> serialize then.

@SimonSapin
Copy link
Member

To be clear I think Kuchiki (which uses html5ever) is what you want, though the documentation is not great.

@tcurdt
Copy link
Author

tcurdt commented Mar 7, 2019

Thanks, will give it a try.

When you say "not actively working on it" does that mean "in maintenance mode" or "noone looks after it"?

@SimonSapin
Copy link
Member

Depends what you mean by “look after” exactly. I try to respond to issues and PRs but I make no promise about time.

@tcurdt
Copy link
Author

tcurdt commented Mar 7, 2019

...bug fixes, merging PRs, releases - that sort of thing.

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