Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
method Docx.prototype.withXmlRule
import { Docx } from "https://deno.land/x/docxml@5.11.3/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: DocumentXml; } & PropsGeneric>["add"]>[1]