(sample.XML.node <- XMLNode("a",
attrs=list(
href="http://example.com",
target="_blank"
),
.children="klick here!"
))
# This is equivalent
(sample.XML.node2 <- XMLNode("a",
"klick here!",
href="http://example.com",
target="_blank"
))
# As is this
(sample.XML.node3 <- XMLNode("a",
.children=list(
"klick here!",
href="http://example.com",
target="_blank"
)
))
Run the code above in your browser using DataLab