Learn R Programming

tm (version 0.5-3)

XMLSource: XML Source

Description

Constructs a source for an XML file.

Usage

XMLSource(x, parser, reader, encoding = "UTF-8")

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
A character giving the encoding of x.

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'.