xml-toolkit 1.0.38 → 1.0.39
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/XMLNode.js +14 -0
- package/package.json +1 -1
package/lib/XMLNode.js
CHANGED
|
@@ -126,6 +126,20 @@ const XMLNode = class extends SAXEvent {
|
|
|
126
126
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
toString () {
|
|
130
|
+
|
|
131
|
+
const {src} = this; if (this.type !== SAXEvent.TYPES.END_ELEMENT || this.isSelfEnclosed) return src
|
|
132
|
+
|
|
133
|
+
let s = this.src
|
|
134
|
+
|
|
135
|
+
for (const child of this.children) s += child
|
|
136
|
+
|
|
137
|
+
s += this.xml
|
|
138
|
+
|
|
139
|
+
return s
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
|
|
129
143
|
get text () {
|
|
130
144
|
|
|
131
145
|
let s = super.text
|