4feb7032a6d7631971530fc75b245ee54c755967
[ccsdk/cds.git] /
1 import { Parser } from './Parser';
2 import { variable } from '@angular/compiler/src/output/output_ast';
3
4 export class XmlParser implements Parser {
5     getVariables(fileContent: string): string[] {
6         const variables = [];
7         const xmlSplit = fileContent.split('$');
8         for (const val of xmlSplit) {
9             const res = val.substring(0, val.indexOf('</'));
10             if (res && res.length > 0) {
11                 variables.push(res);
12             }
13
14         }
15         return variables;
16     }
17
18 }
19
20 /*
21
22 <vlb-business-vnf-onap-plugin xmlns="urn:opendaylight:params:xml:ns:yang:vlb-business-vnf-onap-plugin">
23     <vdns-instances>
24         <vdns-instance>
25             <ip-addr>$vdns_int_private_ip_0</ip-addr>
26             <oam-ip-addr>$vdns_onap_private_ip_0</oam-ip-addr>
27             <tag>aaaa</tag>
28             <enabled>false</enabled>
29             <tag>dddd</tag>
30         </vdns-instance>
31     </vdns-instances>
32 </vlb-business-vnf-onap-plugin>
33
34 */