XMLNode
and
XMLOutputStream
objects
allow it to be generic for different representations of the
XML tree.
saveXML(doc, file=NULL, compression=0, indent=TRUE, prefix = '<?xml version="1.0"?>\n') saveXML.XMLInternalDocument(doc, file=NULL, compression=0, indent=TRUE, prefix = '<?xml version="1.0"?>\n') saveXML.XMLInternalDOM(doc, file=NULL, compression=0, indent=TRUE, prefix = '<?xml version="1.0"?>\n') saveXML.XMLNode(doc, file=NULL, compression=0, indent=TRUE, prefix = '<?xml version="1.0"?>\n') saveXML.XMLOutputStream(doc, file=NULL, compression=0, indent=TRUE, prefix = '<?xml version="1.0"?>\n')
One can create an internal XML tree (or DOM)
using
and
.
saveXML
allows one to generate a textual representation of
that DOM in human-readable and reusable XML format.
saveXML
is a generic function that allows one to call
the rendering operation with either the top-level node
of the DOM or of the document object (of class
XMLInternalDocument
that is used to
accumulate the nodes and with which the developer
adds nodes.
Duncan Temple Lang
http://www.w3.org/XML, http://www.omegahat.org/RSXML
top <- xmlNode("top", xmlNode("next","Some text")) saveXML(top, file="top.xml")