[CCSDK-28] populated the seed code for dgbuilder
[ccsdk/distribution.git] / dgbuilder / core_nodes / deprecated / 74-js2xml.html
1 <!--\r
2   Copyright 2013 IBM Corp.\r
3 \r
4   Licensed under the Apache License, Version 2.0 (the "License");\r
5   you may not use this file except in compliance with the License.\r
6   You may obtain a copy of the License at\r
7 \r
8   http://www.apache.org/licenses/LICENSE-2.0\r
9 \r
10   Unless required by applicable law or agreed to in writing, software\r
11   distributed under the License is distributed on an "AS IS" BASIS,\r
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13   See the License for the specific language governing permissions and\r
14   limitations under the License.\r
15 -->\r
16 \r
17 <script type="text/x-red" data-template-name="json2xml">\r
18     <div class="form-row">\r
19         <label for="node-input-name"><i class="fa fa-list"></i> XML Root</label>\r
20         <input type="text" id="node-input-root" placeholder="object"></input>\r
21     </div>\r
22     <div class="form-row">\r
23         <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>\r
24         <input type="text" id="node-input-name" placeholder="Name"></input>\r
25     </div>\r
26 </script>\r
27 \r
28 <script type="text/x-red" data-help-name="json2xml">\r
29     <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
30     <p>See the <a href="https://github.com/michaelkourlas/node-js2xmlparser" target="_new">js2xmlparser docs</a> for more information.</p>\r
31 </script>\r
32 \r
33 <script type="text/javascript">\r
34     RED.nodes.registerType('json2xml',{\r
35         category: 'deprecated',\r
36         color:"#E6E0F8",\r
37         defaults: {\r
38             name: {value:""},\r
39             root: {value:"object"},\r
40         },\r
41         inputs:1,\r
42         outputs:1,\r
43         icon: "arrow-in.png",\r
44         label: function() {\r
45             return this.name||"json2xml";\r
46         },\r
47         labelStyle: function() {\r
48             return this.name?"node_label_italic":"";\r
49         }\r
50     });\r
51 </script>\r