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

Option to remove empty tags completly #442

Open
omasson-perso opened this issue Mar 13, 2022 · 6 comments
Open

Option to remove empty tags completly #442

omasson-perso opened this issue Mar 13, 2022 · 6 comments
Labels
Feature-Request New features suggested by users

Comments

@omasson-perso
Copy link

Is it possible to create an Builder option in order to remove empty tags ?

"suppressEmptyNode" option builds empty tags to self closing tags, but it would be nice to remove it completely on the output.

Thanks !

@github-actions
Copy link

I'm glad you find this repository helpful. I'll try to address your issue ASAP. You can watch the repo for new changes or star it.

@amitguptagwl amitguptagwl added the Feature-Request New features suggested by users label Mar 16, 2022
@amitguptagwl
Copy link
Member

We're planning to introduce skipNodes in future version. It might help you.

@omasson-perso
Copy link
Author

Thanks for you quick reply.
Do you have a release date ?

Thanks again

@amitguptagwl
Copy link
Member

The decision is still not taken. Check this discussion: #445

@tinusriyanto
Copy link

We're planning to introduce skipNodes in future version. It might help you.

Reading the discussion on skipNodes, it seems that it is intended to be used in XML Parser and you need to specify which node to skip.
While options in general seems to work on both Parser and Builder, I don't think that it will help in the original case since they might not know beforehand which node is empty and therefore need to be skipped.

@amitguptagwl
Copy link
Member

@tinusriyanto builder is not updated as I started working on v5 of this library where I provided better way to handle it. But i couldn't publish the v5 yet due to some performance issue and my busyness.
But to answer your question, from the updateTag method, user will be able to check the value, argument list and other necessary meta data that can help user to decide when to skip a tag in parser or builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Request New features suggested by users
Projects
None yet
Development

No branches or pull requests

3 participants