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

x/docxml/src/utilities/dom.ts

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
import * as docxml from "https://deno.land/x/docxml@3.0.1/src/utilities/dom.ts";

Variables

All the known namespace URIs by their preferred prefix.

A helper object containing the "Q{https://…}" notation of each namespace. Makes writing queries a lot less verbose.

Functions

Create a new XML DOM node using XQuery.

Parse an XML string to DOM using Slimdom's own parser function, but with the "standard" typing that Deno has for Node and Document -- so that type matching is not complicated further down the line.

Serialize an XML node to string using Slimdom's own serializer function, but with the "standard" typing that Deno has for Node and Document.

Run an XQuery Update Facility expression, maybe even repeatedly, which can change an existing DOM.