R/getTopNode.R

Defines functions parseXML getTopNode

# Parse the specified input file and return the doc object
parseXML <- function(infile)
{
   xmlTreeParse(infile, trim=FALSE, addAttributeNamespaces=TRUE)
}

# Extract the top level node from an XML doc object
getTopNode <- function(doc)
{
   if (is.character(doc))
     stop('need to parse XML document with parseXML function')

   doc$doc$children[[1]]
}

Try the odfWeave package in your browser

Any scripts or data that you put into this service are public.

odfWeave documentation built on May 30, 2017, 7:23 a.m.