Displaying 1 result from an estimated 1 matches for "deletexmlnod".
Did you mean:
deletexmlnode
2008 Jul 02
1
Removing or overwriting an XML node
...- xmlTreeParse("duncan.xml", useInternalNodes = TRUE)
# find parent, add as last child:
name <- getNodeSet(x, "//name")[[1]]
newXMLNode("initials", "D.", parent=name)
first <- getNodeSet(x, "//first")[[1]]
? # wanted:
# deleteXMLNode(name)
# or
? # replaceXMLNode("initials", "D.", replace=first)
cat(saveXML(x))
free(x)
As seen above: how do I get rid of (no offense meant ;-) <first>Duncan</first> ?
Alternatively, how do I overwrite <first>...</first> with my own stuff ?
I che...