Learn R Programming

tm (version 0.5-9.1)

XMLSource: XML Source

Description

Constructs a source for an XML file.

Usage

XMLSource(x, parser, reader, encoding = "unknown")

Arguments

x
Either a character identifying a file or a connection.
parser
A function accepting an XML tree (as delivered by xmlTreeParse in package XML) as input and returning a list of XML elements.
reader
A function capable of turning XML elements as returned by parser into a subclass of TextDocument.
encoding
encoding to be assumed for input strings. It is used to mark character strings as known to be in Latin-1 or UTF-8: it is not used to re-encode the input.

Value

  • An object of class XMLSource which extends the class Source representing an XML file.

See Also

Vignette 'Extensions: How to Handle Custom File Formats'. Encoding on encodings in R.