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

[R/pugi] provide xml_rm_child() #273

Merged
merged 5 commits into from
Jul 18, 2022
Merged

[R/pugi] provide xml_rm_child() #273

merged 5 commits into from
Jul 18, 2022

Conversation

JanMarvin
Copy link
Owner

Use cases

> xml_node <- "<a><c>1</c><c>2</c></a>"
> xml_child <- "c"
> 
> # remove all c nodes
> xml_rm_child(xml_node, xml_child, which = 0)
[1] "<a/>"
> # remove only the first c node
> xml_rm_child(xml_node, xml_child, which = 1)
[1] "<a><c>2</c></a>"
> # remove only the second c node
> xml_rm_child(xml_node, xml_child, which = 2)
[1] "<a><c>1</c></a>"

@JanMarvin
Copy link
Owner Author

I'll merge this, but the output formats might be updated in a follow up commit.

@JanMarvin JanMarvin merged commit d317ddb into main Jul 18, 2022
@JanMarvin JanMarvin deleted the xml_rm_child branch July 18, 2022 10:57
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

Successfully merging this pull request may close these issues.

None yet

1 participant