Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
method XmlComponent.prototype.toNode
import { XmlComponent } from "https://deno.land/x/docxml@1.5.0/src/classes/XmlComponent.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>.

Parameters

optional
ancestry: AnyXmlComponent[] = [UNSUPPORTED]

Returns

XmlComponentNodes