readXML(spec, doc)
content
to access theTextDocument
.doc
augmented by the parsed information
as described by spec
out of the XML file in
elem$content
. The arguments language
and id
are used as
fallback: language
if no corresponding metadata entry is found in
elem$content
, and id
if no corresponding metadata entry is found
in elem$content
and if elem$uri
is null.Reader
for basic information on the reader infrastructure
employed by package Vignette 'Extensions: How to Handle Custom File Formats', and
XMLSource
.
readGmane <- readXML(spec = list(author = list("node", "/item/creator"), content = list("node", "/item/description"), datetimestamp = list("function", function(node) strptime(sapply(XML::getNodeSet(node, "/item/date"), XML::xmlValue), format = "%Y-%m-%dT%H:%M:%S", tz = "GMT")), description = list("unevaluated", ""), heading = list("node", "/item/title"), id = list("node", "/item/link"), origin = list("unevaluated", "Gmane Mailing List Archive")), doc = PlainTextDocument())