mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Deprecate xml2js and jsn2xml nodes
Replaced by single XML node
This commit is contained in:
		| @@ -15,11 +15,12 @@ | ||||
|  **/ | ||||
| 
 | ||||
| module.exports = function(RED) { | ||||
|     "use strict"; | ||||
|     var util = require("util"); | ||||
|     var parseString = require('xml2js').parseString; | ||||
|     var useColors = true; | ||||
|     //util.inspect.styles.boolean = "red";
 | ||||
|      | ||||
| 
 | ||||
|     function Xml2jsNode(n) { | ||||
|         RED.nodes.createNode(this,n); | ||||
|         this.useEyes = n.useEyes||false; | ||||
| @@ -15,13 +15,14 @@ | ||||
|  **/ | ||||
| 
 | ||||
| module.exports = function(RED) { | ||||
|     "use strict"; | ||||
|     var js2xmlparser = require("js2xmlparser"); | ||||
|      | ||||
| 
 | ||||
|     function Js2XmlNode(n) { | ||||
|         RED.nodes.createNode(this,n); | ||||
|         this.root = n.root; | ||||
|         var node = this; | ||||
|      | ||||
| 
 | ||||
|         this.on("input", function(msg) { | ||||
|             try { | ||||
|                 var root = node.root || typeof msg.payload; | ||||
		Reference in New Issue
	
	Block a user