Rsamples/tryBug.R

library(XML)
gctorture()
replicate(4, {
b = xmlParse('data/book.xml')
node = getNodeSet(b, "//chapter[2]/section[1]")[[1]]

p = newXMLNode("para", "This is ", newXMLNode("em", "emphasized text"), " within a paragraph", parent = node)
newXMLNode("para", "This is another paragraph", parent = node)
newXMLTextNode("This is second sentence", parent = p)
rm(b)
rm(p)
})

# above works with no problem.

Try the XML package in your browser

Any scripts or data that you put into this service are public.

XML documentation built on June 20, 2017, 9:13 a.m.