Displaying 6 results from an estimated 6 matches for "xmlsapply".
2011 Jun 29
2
parse XML file
...06">13.5</v>
</stationname>
</data>
I would like to get a table in R like this:
stationname date value
Aachen 2011-04-01 14.1
Aachen 2011-04-01 17.6
.
.
.
Ahaus 2011-04-06 13.5
I tried to do this:
doc = xmlRoot(xmlTreeParse("de.dwd.klis.TADM.xml"))
tmp = xmlSApply(doc, function(x) xmlSApply(x, xmlValue))
but the stationname was not parsed because "Aachen" is kind of
attribute of stationname.
Could anyone give some help?
Thanks,
kai.
2005 Mar 11
3
XML to data frame or list
Dear useRs,
I have a simple/RTFM question about XML parsing. Given an XML file,
such as (fragment)
<A>100</A>
<B>23</B>
<C>true</C>
how do I import it in a data frame or list, so that the values (100,
23, true) can be accessed through the names A, B and C?
I installed the XML package and looked over the documentation...
however after 20 minutes and a couple of
2012 Jun 06
1
Process XML files
...sful in processing files uing R's XML librariy. Thank
you, Rxperts!
I know there are libraries like XML and SPXML available in S-Plus. Could
anyone please share examples of reading an xml file and save the contents
in a data frame?
Are there Splus equivalents of "getNodeSet", "xmlSApply" and "xmlValue"?
Thanks so much!
Santosh
[[alternative HTML version deleted]]
2009 Nov 03
1
help with SSOAP (can't find working examples)
First of all, let me confess that I am a newbie to R and don't know
much about the language or the environment. We have a need for
plugging in R in our production runtime and need the ability to pull
data out of our existing services. I am trying to see if I can take
advantage of SSOAP such that we can expose the data via webservices
and use SSOAP to call into them. Our runtime is mostly
2012 Apr 26
0
Modifying values into XML with R
...ropbox.com/s/qxteao3z8ypyfqh/petitXMLwinamp.xml
## load it in R and root it:
winamp<-xmlTreeParse("petitXMLwinamp.xml", useInternal = T)
racine <- xmlRoot(winamp)
racine # to view the library
### I can extract one song (the first one for the example):
une.chanson <- xmlSApply(racine[[1]][["dict"]][[2]],xmlValue)
### I can extract the playcount of this track with:
racine[[1]][["dict"]][[2]][which.max(une.chanson =="Play Count")+1]
### Now, I would simply want to change it from 2 to, lets say, 17:
racine[[1]][["dict"]][[2]][whic...
2009 May 20
2
Example for parsing XML file?
Hi,
I am trying to parse XML files and read them into R as a data frame,
but have been unable to find examples which I could apply
successfully.
I'm afraid I don't know much about XML, which makes this all the more
difficult. If someone could point me in the right direction to a
resource (preferably with an example or two), it would be greatly
appreciated.
Here is a snippet from one of