[CCSDK-28] populated the seed code for dgbuilder
[ccsdk/distribution.git] / dgbuilder / core_nodes / deprecated / 74-js2xml.html
diff --git a/dgbuilder/core_nodes/deprecated/74-js2xml.html b/dgbuilder/core_nodes/deprecated/74-js2xml.html
new file mode 100644 (file)
index 0000000..f614579
--- /dev/null
@@ -0,0 +1,51 @@
+<!--\r
+  Copyright 2013 IBM Corp.\r
+\r
+  Licensed under the Apache License, Version 2.0 (the "License");\r
+  you may not use this file except in compliance with the License.\r
+  You may obtain a copy of the License at\r
+\r
+  http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+-->\r
+\r
+<script type="text/x-red" data-template-name="json2xml">\r
+    <div class="form-row">\r
+        <label for="node-input-name"><i class="fa fa-list"></i> XML Root</label>\r
+        <input type="text" id="node-input-root" placeholder="object"></input>\r
+    </div>\r
+    <div class="form-row">\r
+        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>\r
+        <input type="text" id="node-input-name" placeholder="Name"></input>\r
+    </div>\r
+</script>\r
+\r
+<script type="text/x-red" data-help-name="json2xml">\r
+    <p>A function that parses the <b>msg.payload</b> using the js2xmlparser library. Places the result back in <b>msg.payload</b>.</p>\r
+    <p>See the <a href="https://github.com/michaelkourlas/node-js2xmlparser" target="_new">js2xmlparser docs</a> for more information.</p>\r
+</script>\r
+\r
+<script type="text/javascript">\r
+    RED.nodes.registerType('json2xml',{\r
+        category: 'deprecated',\r
+        color:"#E6E0F8",\r
+        defaults: {\r
+            name: {value:""},\r
+            root: {value:"object"},\r
+        },\r
+        inputs:1,\r
+        outputs:1,\r
+        icon: "arrow-in.png",\r
+        label: function() {\r
+            return this.name||"json2xml";\r
+        },\r
+        labelStyle: function() {\r
+            return this.name?"node_label_italic":"";\r
+        }\r
+    });\r
+</script>\r