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

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
method Component.prototype.toNode
import { Component } from "https://deno.land/x/docxml@5.3.7/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>.