[R] substituting XML tags with custom values

filip fbielejec at gmail.com
Thu Mar 22 20:41:47 CET 2012


I have an xml document with a following element:

<sequence id = "ancestralSequence"> 
    <taxon id="test">

I would like to parse a new sequence of characters inside the "taxon"
tags. I started looking into XML package documentation, but cannot find
a simple solution yet. My code:

# load packages

# create a new sequence

# read the xml
xml <- xmlParse("epoch_mcmc.xml")

# save as character:
charXML <- saveXML(xml)

while(!suceed) { try(); }

More information about the R-help mailing list