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

x/docxml/src/classes/Component.ts>Component#toNode

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

Create a DOM node for this XML component, one that can be stringified to schema-valid OOXML.

By default, an XML component would serialize to its children and string contents -- like a fragment. Most components have an override to use specific OOXML elememnts, such as <w:p>.