| replaceNodeWithChildren | R Documentation | 
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.
replaceNodeWithChildren(node)
| node | an  | 
NULL. The purpose of this function is to modify the internal document.
Duncan Temple Lang
libxml2 documentation.
doc = xmlParse('<doc>
                 <page>
                  <p>A</p>
                  <p>B</p>
                  <p>C</p>
                 </page>
                 <page>
                  <p>D</p>
                  <p>E</p>
                  <p>F</p>
                 </page>
                </doc>')
pages = getNodeSet(doc, "//page")
invisible(lapply(pages, replaceNodeWithChildren))
doc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.