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

Can't apply xml_structure to xml_document #106

Closed
hadley opened this issue Jul 3, 2016 · 3 comments
Closed

Can't apply xml_structure to xml_document #106

hadley opened this issue Jul 3, 2016 · 3 comments

Comments

@hadley
Copy link
Member

hadley commented Jul 3, 2016

xml_structure(xml_new_document())
#>  no applicable method for 'tree_structure' applied to an object of class "xml_document"
@hadley
Copy link
Member Author

hadley commented Jul 3, 2016

And I think this is the same underlying problem:

root <- xml_new_document()

root %>% 
  xml_add_child("a") %>% 
  xml_add_child("b") %>% 
  xml_add_child("c") 
root
#> {xml_document}

@hadley
Copy link
Member Author

hadley commented Jul 3, 2016

Hmmmm, maybe we should resolve this by making xml_new_document() optionally take a string that gives the name of the root node. Oh, but then you'd also need to take attributes.

@jimhester
Copy link
Member

Fixed by #126

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