File: createTree.R

package info (click to toggle)
r-cran-xml 3.99-0.18-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,688 kB
  • sloc: ansic: 6,656; xml: 2,890; asm: 486; sh: 12; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()