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

x/docxml/src/Docx.ts>Docx#withXmlRule

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

Add an XML translation rule, applied to an element that matches the given XPath test.

If an element matches multiple rules, the rule with the most specific XPath test wins.

Parameters

xPathTest: string
transformer: Parameters<GenericRenderer<RuleResult, { document: OfficeDocument; } & PropsGeneric>["add"]>[1]