Description Usage Arguments Value See Also Examples
Create XML text documents.
1 2 3 4 5 6 7 8 9 10 |
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 |
An object inheriting from XMLTextDocument
and
TextDocument
.
TextDocument
for basic information on the text document
infrastructure employed by package tm.
1 2 3 4 5 6 7 | 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)
|
Loading required package: NLP
<<XMLTextDocument>>
Metadata: 7
{xml_document}
<purchaseOrder orderDate="1999-10-20" xmlns="http://tempuri.org/po.xsd">
[1] <shipTo country="US">\n <name>Alice Smith</name>\n <street>123 Maple St ...
[2] <billTo country="US">\n <name>Robert Smith</name>\n <street>8 Oak Avenu ...
[3] <comment>Hurry, my lawn is going wild!</comment>
[4] <items>\n <item partNum="872-AA">\n <productName>Lawnmower</productNa ...
author : character(0)
datetimestamp: 2018-12-07 11:17:23
description : character(0)
heading : XML text document
id : /usr/lib/R/site-library/xml2/extdata/order-doc.xml
language : en
origin : character(0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.