Skip to main content
Module

x/docxml/mod.ts>default#withXmlRule

TypeScript library for parsing and building a DOCXML file
Go to Latest
method default.prototype.withXmlRule
import { default } from "https://deno.land/x/docxml@5.2.0/mod.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]