We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I add an attribute to a tag, then the attribute is also printed when the tag is closed.
script <- xml2::xml_new_document() %>% xml2::xml_add_child("osm-script") union <- xml2::xml_add_child(script, 'union into="_"') query <- xml2::xml_add_child(union, 'query type="way"') script ## {xml_document} ## <osm-script> ## [1] <union into="_">\n <query type="way"/>\n</union into="_">
This seems to violate xml syntax, e.g. in the wikipedia example
<step number="3">Connect A to B.</step>
Am I mistaken? Is there a way to turn off this behavior?
*Note this stackoverflow question
The text was updated successfully, but these errors were encountered:
Your single quotes seem to be in the wrong place, which is causing the 'attributes' to be treated as text nodes.
script <- xml2::xml_new_document() %>% xml2::xml_add_child("osm-script") union <- xml2::xml_add_child(script, "union", into = "_") query <- xml2::xml_add_child(union, "query", type = "way") script #> {xml_document} #> <osm-script> #> [1] <union into="_">\n <query type="way"/>\n</union>
Sorry, something went wrong.
Ah, I've got it. So the tag name and the attributes should come separately. Too clever for me to see immediately, but I've got it now.
No branches or pull requests
If I add an attribute to a tag, then the attribute is also printed when the tag is closed.
This seems to violate xml syntax, e.g. in the wikipedia example
Am I mistaken? Is there a way to turn off this behavior?
*Note this stackoverflow question
The text was updated successfully, but these errors were encountered: