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

Is it possible to slightly manipulate the output HTML? #187

Open
sindoc opened this issue Mar 17, 2023 · 1 comment
Open

Is it possible to slightly manipulate the output HTML? #187

sindoc opened this issue Mar 17, 2023 · 1 comment

Comments

@sindoc
Copy link

sindoc commented Mar 17, 2023

Is it possible to use pup to add HTML elements under a particular node?

Say I need to add under 'html > head'

@gromgit
Copy link

gromgit commented Mar 17, 2023

No. pup only selects and outputs existing HTML. It's also pretty much abandoned, so I wouldn't hope for enhancements at this point.

You probably need something like XMLStarlet instead. It's even older than pup, and it's really intended for XML manipulation, but it should work OK with HTML that's not completely sloppy.

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