1 | 'use strict';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | const lang = require('zero-lang');
|
8 | const xmldom = require('xmldom');
|
9 | const dom2js = require('./dom2js');
|
10 | const dom2json = require('./dom2json');
|
11 | const escape = require('./escape');
|
12 | const getInnerXML = require('./get-inner-xml');
|
13 | const js2xml = require('./js2xml');
|
14 | const json2xml = require('./json2xml');
|
15 | const sanitize = require('./sanitize');
|
16 | const unescape = require('./unescape');
|
17 | const xml = require('./xml');
|
18 | const xml2js = require('./xml2js');
|
19 | const xml2json = require('./xml2json');
|
20 |
|
21 | lang.extend(xml, {
|
22 | ENV: 'node',
|
23 | dom2js,
|
24 | dom2json,
|
25 | domParser: new xmldom.DOMParser(),
|
26 | escape,
|
27 | getInnerXML,
|
28 | getOuterXML: xml.serialize,
|
29 | js2xml,
|
30 | json2xml,
|
31 | sanitize,
|
32 | unescape,
|
33 | xml2js,
|
34 | xml2json,
|
35 | xmlSerializer: new xmldom.XMLSerializer(),
|
36 | });
|
37 |
|
38 | module.exports = xml;
|