xml-toolkit 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/NamespacesMap.js +2 -0
- package/lib/XMLPrinter.js +3 -1
- package/package.json +1 -1
package/lib/NamespacesMap.js
CHANGED
package/lib/XMLPrinter.js
CHANGED
|
@@ -198,9 +198,11 @@ const XMLPrinter = class {
|
|
|
198
198
|
|
|
199
199
|
this.openElement (node.name)
|
|
200
200
|
|
|
201
|
+
const {namespacesMap} = node; if (namespacesMap != null && namespacesMap.has ('')) this.writeAttribute ('xmlns', namespacesMap.get (''))
|
|
202
|
+
|
|
201
203
|
if (this.stack.length === 1) {
|
|
202
204
|
|
|
203
|
-
|
|
205
|
+
if (namespacesMap != null) {
|
|
204
206
|
|
|
205
207
|
let min = Infinity; for (const name of namespacesMap.keys ()) {
|
|
206
208
|
|