[CCSDK-28] populated the seed code for dgbuilder
[ccsdk/distribution.git] / dgbuilder / core_nodes / deprecated / 73-parsexml.html
1 <!--
2   Copyright 2013 IBM Corp.
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8   http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15 -->
16
17 <script type="text/x-red" data-template-name="xml2js">
18     <!-- <div class="form-row">
19         <label>Use Console</label>
20         <input type="checkbox" id="node-input-useEyes" placeholder="Name" style="display: inline-block; width: auto; vertical-align: top;">
21         <label for="node-input-useEyes" style="width: 70%;">Debug output in console ?</label>
22     </div> -->
23     <div class="form-row">
24         <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
25         <input type="text" id="node-input-name" placeholder="Name">
26     </div>
27     <!-- <div class="form-tips">Uses xml2js to process xml into javascript object.</div> -->
28 </script>
29
30 <script type="text/x-red" data-help-name="xml2js">
31     <p>A function that parses the <b>msg.payload</b> using the xml2js library. Places the result in the payload.</p>
32     <p>See <a href="https://github.com/Leonidas-from-XIV/node-xml2js/blob/master/README.md" target="_new">the xml2js docs <i>here</i></a> for more information.</p>
33 </script>
34
35 <script type="text/javascript">
36     RED.nodes.registerType('xml2js',{
37         category: 'deprecated',
38         color:"#E6E0F8",
39         defaults: {
40         //useEyes: {value:false},
41         name: {value:""}
42         },
43         inputs:1,
44         outputs:1,
45         icon: "arrow-in.png",
46         label: function() {
47             return this.name||"xml2json";
48         },
49         labelStyle: function() {
50             return this.name?"node_label_italic":"";
51         }
52     });
53 </script>