xmlURL <- "http://www.omegahat.org/Scripts/Data/mtcars.xml"
xmlText <- paste(scan.url(xmlURL, what="", sep="\n"),"\n",collapse="\n")
xmlURL <- system.file("exampleData", "mtcars.xml", package="XML")
xmlText <- paste(readLines(xmlURL), "", collapse="")
xmlEventParse(xmlText, handlers = NULL, asText=T)
xmlEventParse(xmlText, xmlHandler(), useTagName=T, asText=T)
Run the code above in your browser using DataLab