myTests/saveEntities.R

library(XML)
txt = newXMLTextNode("x < 1")

txt # okay

saveXML(txt) # x < 1

txt = newXMLTextNode(I("x < 1"))

txt # okay

saveXML(txt) # x < 1

.Call("R_setXMLInternalTextNode_noenc", txt)

saveXML(txt)


#
xml <- xmlTree("tree")
xml$addNode("test", "a &cap; b")
xml$addNode("test", I("a &cap; b"))
xml$value()
omegahat/XML documentation built on Jan. 17, 2024, 6:47 p.m.