I am trying to add a child to a child using XML package in R. the following fails
library(XML) node1 <- c("val1","val2","val3") names(node1) <- c("att1","att2","att3") root <- xmlNode("root", attrs=node1) node2 <- LETTERS[1:3] names(node2) <- paste("name",1:3,sep="") root <- addChildren(root,xmlNode("child1",attrs=node2)) node3 <- letters[1:3] names(node3) <- paste("name",4:6,sep="") root <- addChildren(root$child1,xmlNode("child2",attrs=node3)) Error in UseMethod("addChildren") : no applicable method for 'addChildren' applied to an object of class "NULL" Stephen B [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.