summaryrefslogtreecommitdiffstats
path: root/dgbuilder/public/util/js/dgeToXml.js
diff options
context:
space:
mode:
authorChinthakayala,Sheshashailavas(sc2914) <sc2914@att.com>2018-06-27 16:11:44 +0000
committerChinthakayala,Sheshashailavas(sc2914) <sc2914@att.com>2018-06-27 16:25:31 +0000
commit8f6a6c445eaeb7356e1db9d10d10b7d3fa42f27e (patch)
treebf1e5c83c357fbd4a0158cac6d41bd936e949a80 /dgbuilder/public/util/js/dgeToXml.js
parente14a02086c9119532f9153c78346d5c1d6789ca9 (diff)
removed dependency on built-editor.min.js
and added ability to test DG from dgbuilder and fixed the break node on XML generation and added ability to download formatted DG XML and DG JSON Issue-ID: SDNC-353 Change-Id: I799de5de2c4f61e9b56dbe996d8ac3e3b28061f7 Signed-off-by: Chinthakayala,Sheshashailavas(sc2914) <sc2914@att.com>
Diffstat (limited to 'dgbuilder/public/util/js/dgeToXml.js')
-rw-r--r--dgbuilder/public/util/js/dgeToXml.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/dgbuilder/public/util/js/dgeToXml.js b/dgbuilder/public/util/js/dgeToXml.js
index 7582d275..e99d6495 100644
--- a/dgbuilder/public/util/js/dgeToXml.js
+++ b/dgbuilder/public/util/js/dgeToXml.js
@@ -695,7 +695,12 @@ function getNodeToXml(inputNodeSet){
}
xmlStr+=node.xml;
startTag = getStartTag(node);
- fullXmlStr +=xmlStr;
+ //special handling for break node
+ if(xmlStr != undefined && xmlStr != null && xmlStr.trim() == "<break>"){
+ fullXmlStr += "<break/>";
+ }else{
+ fullXmlStr +=xmlStr;
+ }
/*
if(level > 0){
var spacing = Array(level).join(" ");
@@ -737,7 +742,9 @@ function getNodeToXml(inputNodeSet){
//append end tag
if(startTag != ""){
- fullXmlStr += "</" + startTag + ">";
+ if(startTag != "break"){
+ fullXmlStr += "</" + startTag + ">";
+ }
/*
if(level >0){
var spacing = Array(level).join(" ");
@@ -1280,6 +1287,8 @@ function migrateNodes(jsonStr){
}
}else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<exists") != -1){
node.type="exists";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<break") != -1){
+ node.type="break";
}else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<block") != -1){
node.type="block";
var atomic=getAttributeValue(node.xml,"atomic");
@@ -1293,6 +1302,8 @@ function migrateNodes(jsonStr){
}
}else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<save") != -1){
node.type="save";
+ }else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<while") != -1){
+ node.type="while";
}else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<switch") != -1){
node.type="switchNode";
}else if(node.xml != undefined && node.xml != null && node.xml.indexOf("<record") != -1){