WordArchive-class: WordArchive representing a .docx file

WordArchive-classR Documentation

WordArchive representing a .docx file

Description

This is a class that represents a .docx file and allows access to the individual elements within that archive. We can access the different elements in a structured manner by knowing this is a Word file rather than a generic Office Open XML document. We do, however, inherit many of the facilities from this parent class OOXMLArchive.

Objects from the Class

Most instances of this class are created via a call towordDoc.

Slots

.Data:

Object of class "character" ~~

classes:

Object of class "character" names of the classes that this implements. (These are available from the S4 hierarchy but are here also for some experimental purposes.)

elements:

Object of class "character" the names of the elements in the .docx file when it was read, i.e. when the WordArchive object was constructured, or updated when we add elements.

Extends

Class "OOXMLArchive", directly. Class "ZipFileArchive", by class "OOXMLArchive", distance 2. Class "character", by class "OOXMLArchive", distance 3. Class "ZipArchive", by class "OOXMLArchive", distance 3. Class "vector", by class "OOXMLArchive", distance 4. Class "data.frameRowLabels", by class "OOXMLArchive", distance 4.

Methods

[[

signature(x = "WordArchive", i = "character", j = "missing"): access an element in the .docx archive, parsing it if is an XML document.

addToDoc

signature(archive = "WordArchive", node = "character"): add XML content to the primary XML document within the archive.

addToDoc

signature(archive = "WordArchive", node = "XMLInternalNode"): add an already created XML node to the primary XML document within the archive.

getDocument

signature(doc = "WordArchive"): ...

getImages

signature(doc = "WordArchive"): ...

getListNodes

signature(doc = "WordArchive"): ...

getTableNodes

signature(doc = "WordArchive"): ...

hyperlinks

signature(doc = "WordArchive"): ...

lists

signature(x = "WordArchive"): get an R list of the content lists within the primary document.

tables

signature(x = "WordArchive"): get a list of the tables within the primary document in the Word archive.

toc

signature(file = "WordArchive"): ...

coerce

signature(from = "character", to = "WordArchive"): coerce a file name to a WordArchive, same as wordDoc.

coerce

signature(from = "XMLInternalDocument", to = "WordArchive"): get the WordArchive from a parsed XML document within that archive. The docName element of these XML documents contains the archive name and the internal element name.

coerce

signature(from = "XMLInternalElementNode", to = "WordArchive"): obtain the WordArchive object from a node in a parsed XML document originating from within that archive.

coerce

signature(from = "RWordXMLDoc", to = "WordArchive"): obtain the WordArchive from the parsed XML document that is the primary XML document within the archive.

Author(s)

Duncan Temple Lang

Examples

showClass("WordArchive")

duncantl/RWordXML documentation built on Nov. 23, 2023, 4:23 p.m.