From 296d2bdbaba99d34ce62a8483b5d8d4f90761379 Mon Sep 17 00:00:00 2001 From: AhmedEldeeb50 Date: Wed, 15 Jul 2020 21:58:59 +0200 Subject: support XML for "Upload Attributes List" button for mapping Issue-ID: CCSDK-2571 Signed-off-by: AhmedEldeeb50 Change-Id: I4164fdef145e92faa2cf2550a036d50273127c6a --- .../template-mapping/utils/XmlParser.ts | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/utils/XmlParser.ts (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/utils/XmlParser.ts') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/utils/XmlParser.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/utils/XmlParser.ts new file mode 100644 index 000000000..4feb7032a --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/utils/XmlParser.ts @@ -0,0 +1,34 @@ +import { Parser } from './Parser'; +import { variable } from '@angular/compiler/src/output/output_ast'; + +export class XmlParser implements Parser { + getVariables(fileContent: string): string[] { + const variables = []; + const xmlSplit = fileContent.split('$'); + for (const val of xmlSplit) { + const res = val.substring(0, val.indexOf(' 0) { + variables.push(res); + } + + } + return variables; + } + +} + +/* + + + + + $vdns_int_private_ip_0 + $vdns_onap_private_ip_0 + aaaa + false + dddd + + + + +*/ -- cgit 1.2.3-korg