This question is similar to a previous question, Import all fields (and subfields) of XML as dataframe, but I want to pull out only a subset of the XML data and want to incl
You can use xmlToList and then plyr to get a dataframe you can use
require(XML)
require(plyr)
xD <- xmlParse(xData)
xL <- xmlToList(xD)
ldply(xL, data.frame)
> ldply(xL, data.frame)
.id name buildings.building.type buildings.building.bname
1 city London landmark Tower Bridge
2 city New York station Grand Central
3 city Paris landmark Eiffel Tower
buildings.building.type.1 buildings.building.bname.1
1 station Waterloo
2
3 landmark Louvre
You can pick what you need from this dataframe