xml_cdata(content)
x <- xml_new_root("root") xml_add_child(x, xml_cdata("<d/>")) as.character(x)
Run the code above in your browser using DataLab