Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

767 B

w3c-xmlserializer

An XML serializer that follows the W3C specification.

This module is mostly used as an internal part of jsdom. However, you can use it independently with some care. That isn't very well-documented yet, but hopefully the below sample can give you an idea.

Basic usage

const { XMLSerializer } = require("w3c-xmlserializer");
const { JSDOM } = require("jsdom");

const { document } = new JSDOM().window;
const XMLSerializer = XMLSerializer.interface;
const serializer = new XMLSerializer();
const doc = document.createElement("akomaNtoso");

console.log(serializer.serializeToString(doc));
// => '<akomantoso xmlns="http://www.w3.org/1999/xhtml"></akomantoso>'