Re: [R] xmlToDataFrame#Help!!!#follow-up

2010-01-10 Thread Gabor Grothendieck
Try this: library(XML) doc <- xmlTreeParse("adodb.xml", useInternalNodes = TRUE) Lines <- xpathSApply(doc, "//z:row", function(x) do.call(paste, as.list(xmlAttrs(x DF <- read.table(textConnection(Lines), col.names = xpathSApply(doc, "//s:AttributeType", function(x) xmlAttrs(x)[

[R] xmlToDataFrame#Help!!!#follow-up

2010-01-10 Thread Christian Ritter
Dieter Menne pointed out that the (small) xml attachment didn't make it. Here is an in-line version (see end of message). Let's hope it works this time. I'm struggling with interpreting XML files created by ADODB as data.frames and I'm looking for advice. Note: This xlm contains a result set

Re: [R] xmlToDataFrame#Help!!!

2010-01-10 Thread Duncan Temple Lang
Christian Ritter wrote: > I'm struggling with interpreting XML files created by ADODB as > data.frames and I'm looking for advice (see attached example file). You'll have to attach it (or give us a URL for it). Also, you should tell us what you have tried and how it failed. And of course, your s

Re: [R] xmlToDataFrame#Help!!!

2010-01-10 Thread Dieter Menne
Christian Ritter-4 wrote: > > I'm struggling with interpreting XML files created by ADODB as > data.frames and I'm looking for advice (see attached example file). > xmlToDataFrame is limited to "fairly flat" structures, so maybe your file is not flat enough. Try first to read in with xmlTree

[R] xmlToDataFrame#Help!!!

2010-01-10 Thread Christian Ritter
I'm struggling with interpreting XML files created by ADODB as data.frames and I'm looking for advice (see attached example file). Note: This file contains a result set which comes from a rectangular data array. I've been trying to play with parameters to the xmlToDataFrame function in the XML