Skip to content
Prev 143110 / 398498 Next

XML write?

By write, do you mean print?

In that case using the basic.xml file that comes with the XML package:

library(XML)
basic.xml <- system.file("exampleData", "basic.xml", package = "XML")

# try this

con <- xmlTreeParse(basic.xml)
root <- xmlRoot(con)
root

# or if you are using internal nodes:

con <- xmlTreeParse(basic.xml, useInternalNodes = TRUE)
root <- xmlRoot(con)
cat(saveXML(root), "\n")

On Tue, Apr 29, 2008 at 9:37 AM, Alberto Monteiro
<albmont at centroin.com.br> wrote: