login/node_modules/w3c-xmlserializer
Rakesh Kumar 807bb60301
Update build files and add node_modules (#54)
* update build files

* add node_modules
2020-09-23 12:15:33 +05:30
..
lib Update build files and add node_modules (#54) 2020-09-23 12:15:33 +05:30
package.json Update build files and add node_modules (#54) 2020-09-23 12:15:33 +05:30
README.md Update build files and add node_modules (#54) 2020-09-23 12:15:33 +05:30

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>'