How I can cast a string to XML file in R?

I have a String variable xml <-'<Model>......'. I want to cast this variable to XML File and then export this file as xml file in my disk. How I can do this? I can't use the library xmlview because for my version of R is not availaible.

Upvotes: 1

Views: 1948

Answers (1)

sckott
sckott

Reputation: 5893

use XML package

(xml <- xmlParse(xml))
saveXML(xml, file = "my.xml")
#> [1] "my.xml"

Upvotes: 2

Related Questions