Re: [R] Assistance converting to R a python function that extracts from an XML file

2014-12-15 Thread MacQueen, Don
Thanks! -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 12/13/14, 1:22 PM, "Boris Steipe" wrote: >Or ... > >txt <- >"2012062707322600" > >if (!require(XML)) { > install.packages("XML") > library(XML) >} > > >re

Re: [R] Assistance converting to R a python function that extracts from an XML file

2014-12-15 Thread MacQueen, Don
Duncan, Thank you very much. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 12/13/14, 1:06 PM, "Duncan Temple Lang" wrote: >Hi Don > >library(XML) >readxmldate = >function(xmlfile) >{ > doc = xmlParse(xmlfile) >

Re: [R] Assistance converting to R a python function that extracts from an XML file

2014-12-13 Thread Boris Steipe
Or ... txt <- "2012062707322600" if (!require(XML)) { install.packages("XML") library(XML) } result <- xmlParse(txt, asText=TRUE) # or ... result <- xmlParse(your-file-here.xml) toString.XMLNode(getNodeSet(result,'//CreaDate/text()')[[1]]) toString.XMLNode(getNodeSet(result,'/

Re: [R] Assistance converting to R a python function that extracts from an XML file

2014-12-13 Thread Duncan Temple Lang
Hi Don library(XML) readxmldate = function(xmlfile) { doc = xmlParse(xmlfile) xpathSApply(doc, '//Esri/CreaDate | //Esri/CreaTime', xmlValue) } D. On 12/13/14, 12:36 PM, MacQueen, Don wrote: > I would appreciate assistance doing in R what a colleague has done in > python. Unfortunately (f