Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/docxml/src/files/Relationships.ts>Relationships

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

Constructors

new
Relationships(
location: string,
instances?,
)

Methods

protected
toNode(): Document
add(type: RelationshipType, instance: File): string

Create a new relationship and return the new identifier

ensureRelationship<C extends File>(type: RelationshipType, createInstance: () => C): C
find<R extends File = File>(cb: (meta: RelationshipMeta) => boolean): R | null

Find a relationship instance (eg. a OfficeDocument) by its metadata. The metadata would tell you what type of relationship it is.

toArchive(archive: Archive): void

Static Methods

fromArchive(archive: Archive, location: string): Promise<Relationships>

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