Skip to content

Instantly share code, notes, and snippets.

@nanxstats
Created September 30, 2012 16:43
Show Gist options
  • Save nanxstats/3807535 to your computer and use it in GitHub Desktop.
Save nanxstats/3807535 to your computer and use it in GitHub Desktop.
Simple XML Parsing
require(XML)
doc = xmlParse('score.xml',
useInternal = TRUE, encoding = 'utf-8')
tab = data.frame(name = sapply(getNodeSet(doc, path = "//ROW//XM"), xmlValue),
mail = sapply(getNodeSet(doc, path = "//ROW//DZYX"), xmlValue),
phone = sapply(getNodeSet(doc, path = "//ROW//LXDH"), xmlValue))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment