Access and Modify the current XML encoding

DESCRIPTION:

These functions modify and retrieve the current XML encoding.

USAGE:

setXMLEncoding(encoding="UTF-8")
getXMLEncoding()

ARGUMENTS:

encoding
this allows user to specify an encoding other than the default (UTF-8). Another common encoding is iso-8859-1.

VALUE:

getXMLEncoding returns the encoding type. setXMLEncoding returns NULL

REFERENCES:

http://www.w3.org/XML

SEE ALSO:

, , ,

EXAMPLES:

# get current encoding
oldEncoding <- getXMLEncoding()
# ensure that we create a file with iso-8859-1
setXMLEncoding("iso-8859-1")

# create XML file
xmlObject <- list(fuel.frame, hist, c(1:50))
xmlFileName <- "object.xml"
annotation <- "This is an example of createXMLFile usage"
precision <- 5
createXMLFile(xmlObject, xmlFileName, annotation, precision)

# return to original encoding
setXMLEncoding(oldEncoding)