\name{replaceNodeWithChildren} \alias{replaceNodeWithChildren} \title{Replace an XML node with it child nodes} \description{ This function can be used to flatten parts of an XML tree. This takes a node and removes itself from the tree, but places its kids in it place. } \usage{ replaceNodeWithChildren(node) } \arguments{ \item{node}{an \code{XMLInternalNode} object} } \value{ \code{NULL}. The purpose of this function is to modify the internal document. } \references{ libxml2 documentation. } \author{ Duncan Temple Lang } \examples{ doc = xmlParse('

A

B

C

D

E

F

') pages = getNodeSet(doc, "//page") invisible(lapply(pages, replaceNodeWithChildren)) doc } \keyword{IO}