https://github.com/cran/XML
Raw File
Tip revision: 187d2aeb459ef3a5c36d316bbc127acb2c6ef524 authored by Duncan Temple Lang on 07 December 2011, 00:00:00 UTC
version 3.6-2
Tip revision: 187d2ae
createTree.R
doc <- xmlTree()
doc$addTag("EXAMPLE", close= FALSE, attrs=c("prop1" = "gnome is great", prop2 = "& linux too"))
  doc$addComment("A comment")
  doc$addTag("head", close= FALSE)
   doc$addTag("title", "Welcome to Gnome")
   doc$addTag("chapter", close= FALSE)
     doc$addTag("title", "The Linux Adventure")
     doc$addTag("p")

     doc$addTag("image", attrs=c(href="linux.gif"))
   doc$closeTag()  
  doc$closeTag()  

  doc$addTag("foot")

doc$closeTag()
back to top