writexml

use R to read a XML file, select few nodes and write it back to another XML

倾然丶 夕夏残阳落幕 提交于 2019-12-13 14:30:31
问题 I am trying to use R to read a XML file, select few nodes and write it back to another XML I am learning now to handle XML files in R, referred the example in this link "http://www.r-bloggers.com/r-and-the-web-for-beginners-part-ii-xml-in-r/", which explains how to read the XML and print selected nodes. I want to extend the example mentioned - I want to select the a range of "plant" nodes (For instance 1 through 5) and store it in anoter XML The input XML file looks like this <?xml version="1