xml_node <- ""
xml_child <- ""
# add child to first level node
xml_add_child(xml_node, xml_child)
# add child to second level node as request
xml_node <- xml_add_child(xml_node, xml_child, level = c("b"))
# add child to third level node as request
xml_node <- xml_add_child(xml_node, "", level = c("b", "c"))
Run the code above in your browser using DataLab