# NOT RUN {
tt =
'<x>
<a>text</a>
<b foo="1"/>
<c bar="me">
<d>a phrase</d>
</c>
</x>'
doc = xmlParse(tt)
xmlToList(doc)
# use an R-level node representation
doc = xmlTreeParse(tt)
xmlToList(doc)
# }
Run the code above in your browser using DataLab