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

Comment nodes? #111

Closed
jimhester opened this issue Jul 7, 2016 · 1 comment
Closed

Comment nodes? #111

jimhester opened this issue Jul 7, 2016 · 1 comment

Comments

@jimhester
Copy link
Member

@jimhester jimhester commented Jul 7, 2016

Not sure these are possible to add either currently...

@jimhester
Copy link
Member Author

@jimhester jimhester commented Dec 8, 2016

Now possible

library(xml2)
library(magrittr)
d <- xml_new_document() %>%
  xml_add_child('style', type='text/css') %>%
  xml_add_child(xml_comment('Hello!')) %>%
  xml_root()
as.character(d)
#> [1] "<?xml version=\"1.0\"?>\n<style type=\"text/css\"><!--Hello!--></style>\n"
@jimhester jimhester closed this in 7ae3208 Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant