Create XML text documents.
XMLTextDocument(x = xml_missing(),
author = character(0),
datetimestamp = as.POSIXlt(Sys.time(), tz = "GMT"),
description = character(0),
heading = character(0),
id = character(0),
language = character(0),
origin = character(0),
…,
meta = NULL)
An XMLDocument
.
a character or an object of class person
giving
the author names.
an object of class POSIXt
or a character
string giving the creation date/time information. If a character string,
exactly one of the ISO 8601 formats defined by
http://www.w3.org/TR/NOTE-datetime should be used.
See parse_ISO_8601_datetime
in package NLP
for processing such date/time information.
a character giving a description.
a character giving the title or a short heading.
a character giving a unique identifier.
a character giving the language (preferably as IETF language tags, see language in package NLP).
a character giving information on the source and origin.
user-defined document metadata tag-value pairs.
a named list or NULL
(default) giving all metadata. If set
all other metadata arguments are ignored.
An object inheriting from XMLTextDocument
and
TextDocument
.
TextDocument
for basic information on the text document
infrastructure employed by package tm.
# NOT RUN {
xml <- system.file("extdata", "order-doc.xml", package = "xml2")
(xtd <- XMLTextDocument(xml2::read_xml(xml),
heading = "XML text document",
id = xml,
language = "en"))
content(xtd)
meta(xtd)
# }
Run the code above in your browser using DataLab