Skip to content

Replacements for xmldom

@xmldom/xmldom

@xmldom/xmldom is the maintained fork of the original xmldom.

For example:

ts
import { DOMParser, XMLSerializer } from 'xmldom'
import { DOMParser, XMLSerializer } from '@xmldom/xmldom'

const doc = new DOMParser().parseFromString(source, 'text/xml')
const xml = new XMLSerializer().serializeToString(doc)

CommonJS:

ts
const { DOMParser, XMLSerializer } = require('xmldom') 
const { DOMParser, XMLSerializer } = require('@xmldom/xmldom') 

Released under the MIT License. (68c82e22)