xml-twig 1.3.7 → 1.3.8

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/twig.js +8 -0
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "name": "xml-twig",
7
7
  "description": "Node module for processing huge XML documents in tree mode",
8
- "version": "1.3.7",
8
+ "version": "1.3.8",
9
9
  "main": "twig.js",
10
10
  "directories": {
11
11
  "doc": "doc"
package/twig.js CHANGED
@@ -769,6 +769,14 @@ class Twig {
769
769
  return this.root().writer(true, true).output;
770
770
  };
771
771
 
772
+ /**
773
+ * Returns XML string of the element
774
+ * @returns {string} The XML-Element as string
775
+ */
776
+ toString = function () {
777
+ return this.writer(true).toString();
778
+ };
779
+
772
780
  /**
773
781
  * Internal recursive function used by `writer()`
774
782
  * @param {external:XMLWriter} xw - The writer object