Skip to main content
Module

x/docxml/mod.ts>Docx

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
class Docx
import { Docx } from "https://deno.land/x/docxml@2.1.0/mod.ts";

Represents the .docx file, which is essentially a ZIP archive with a bunch of XML files and some naming conventions.

The files contained in a .docx archive are modelled as properties (recursive) using classes in src/files/.

Constructors

new
private
Docx(
options: Options,
contentTypes?,
relationships?,
)

Properties

private
_officeDocument: OfficeDocument | null
private
readonly
options: Options
readonly
contentTypes: ContentTypes
readonly
document
readonly
relationships: Relationships

Static Methods

fromArchive(archive: ZipArchive, options?: Options): Promise<Docx>

Instantiate this class by looking at the DOCX archive for it.

fromArchive(location: string, options?: Options): Promise<Docx>
fromNothing(options?: Options)

Create an empty bundle, and populate it with the minimum viable contents