Skip to content

Commit 3761991

Browse files
Upgrading all libs in the project
including xmldom with has some api changes
1 parent 82b2fd7 commit 3761991

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"name": "njs-tfso-xml",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"main": "./index.js",
55
"scripts": {
66
"test": "mocha --recursive ./test/**/test*"
77
},
88
"dependencies": {
9-
"lodash": "^4.17.10",
9+
"lodash": "^4.17.15",
1010
"sax": "^1.2.4",
11-
"through2": "^2.0.3",
12-
"xml2js": "^0.4.19",
13-
"xmldom": "^0.1.27"
11+
"through2": "^2.0.5",
12+
"xml2js": "^0.4.23",
13+
"xmldom": "^0.3.0"
1414
},
1515
"devDependencies": {
16-
"chai": "^3.5.0",
17-
"mocha": "^3.0.2"
16+
"chai": "^4.2.0",
17+
"mocha": "^7.1.0"
1818
}
1919
}

src/XmlWriter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class XmlWriter{
2828
const documentElement = doc.documentElement
2929

3030
if(namespaceURI && schemaLocation){
31-
documentElement.setAttributeNS(namespaceURI, 'xsi:schemaLocation', schemaLocation)
31+
documentElement.setAttribute('xmlns:xsi', namespaceURI)
32+
documentElement.setAttribute('xsi:schemaLocation', schemaLocation)
3233
}
3334

3435
return new XmlWriter(doc, documentElement)

0 commit comments

Comments
 (0)