XMLTextDocument {tm} | R Documentation |
XML Text Documents
Description
Create XML text documents.
Usage
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)
Arguments
x |
An |
author |
a character or an object of class |
datetimestamp |
an object of class |
description |
a character giving a description. |
heading |
a character giving the title or a short heading. |
id |
a character giving a unique identifier. |
language |
a character giving the language (preferably as IETF language tags, see language in package NLP). |
origin |
a character giving information on the source and origin. |
... |
user-defined document metadata tag-value pairs. |
meta |
a named list or |
Value
An object inheriting from XMLTextDocument
and
TextDocument
.
See Also
TextDocument
for basic information on the text document
infrastructure employed by package tm.
Examples
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)