contentTypes: Query and update the content types of an Office Open archive

addDefaultContentTypeR Documentation

Query and update the content types of an Office Open archive

Description

These functions allow us to query the content type of individual components/files within an Office Open archive/document and to also add new content type information such as extensions and the default type.

Usage

addDefaultContentType(ext, type, node)
addExtensionTypes(archive, exts, update = TRUE)
contentTypes(ar, asXML = TRUE)

Arguments

ar,archive

the archive object identifying the OO document.

asXML

whether to parse the content types document as an XML document and returned the parsed tree.

exts

named character vector giving the extensions as names and the content type as the corresponding value.

update

a logical value indicating whether to update the OO archive or just the XML tree.

ext

a string identifying the extension for which we are adding default content type

type

a string identifying the content type for the specified extension

node

the XML node to which to add the content type

Value

contentTypes returns an XML document with root node Types. The children are Override and Default that specify the content type for each "file" within the archive.


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