I am trying to create a data frame from a xml file. I want the data frame to look like:
ID TagName Count
1 bob 12
2 Sue 52
3 carl 15
This is my code so far:
doc<-xmlTreeParse("data.xml", useInternal = TRUE)
rootNode<-xmlRoot(doc)
The file looks like (I couldn't use arrows for some reason):
<tag>
<row Id = "1" TagName= "bob" Count = "12" />
<row Id = "2" TagName= "Sue" Count = "52" />
<row Id = "3" TagName= "carl" Count= "15" />
any help will be appreciated.