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

x/docxml/src/classes/XmlFile.ts>XmlFile

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

Constructors

new
protected
XmlFile(location: string)

Properties

readonly
location: string

Methods

protected
toNode(): Document

Create a (slimdom) Document DOM for this XML file. This is useful for serializing it to string and writing to a ZIP/DOCX archive later.

deprecated
$$$toNode()

Get all XmlFile instances related to this one, including self. This helps the system serialize itself back to DOCX fullly.

By default only returns the instance itself but no other related instances.

Let a file tell the system when it is effectively empty, so it can be omitted from the archive.

toArchive(archive: ZipArchive): void

Add all related files to the given archive.

Static Methods

fromArchive(_archive: ZipArchive, location: string): Promise<XmlFile>

Promise a new JS instance of this file based on the given archive.