Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
= function instantiate(fileBasePath, tmplName, context)
{
/* TODO: Sanitize file names. */
var filename = this.docDir + "/" + fileBasePath + ".html";
console.log("generating " + filename);
var template = handlebars.loadPartial(tmplName);
var page = pretty.xml(template(context));
fs.writeFileSync(filename, page);
};
function saveXml (service, methodName, xml) {
if (writable) {
const prettyXml = pd.xml(xml)
const folderPath = path + `/${service}`
// make sure folder exists
if (!Fs.existsSync(folderPath)) {
// make the folder
Fs.mkdirSync(folderPath)
}
const filePath = folderPath + `/${methodName}.xml`
Fs.writeFileSync(filePath, prettyXml)
}
}
= function instantiate(filename, templateName, context)
{
console.log("documenting " + templateName + " at " + filename);
var template = handlebars.loadPartial(templateName);
var page = pretty.xml(template(context));
fs.writeFileSync(filename, page);
};
fs.readFile(xmlPath, 'utf8', function(err, data){
var xml_pp = pd.xml(data)
res.render('xml', {xml: xml_pp})
})
})
module.getContextString = function () {
return pd.xml(new xmldom.XMLSerializer().serializeToString(doc));
};
module.getContextString = function () {
return pd.xml(new xmldom.XMLSerializer().serializeToString(doc));
};
prettyPrint: function (doc) {
return pd.xml(new xmldom.XMLSerializer().serializeToString(doc));
},
function(ep) {
if (ep.endpointName === endpointName) {
this.setState({
showData: true,
showVisualization: false,
currentEndpoint: ep.endpointName,
XMLValue: pd.xml(ep.daggraph),
JSONValue: ep.endpointDetails,
nameValue: ep.endpointName
});
}
}.bind(this)
);
function(err, result) {
if (!err) {
this.setState({
XMLValue: pd.xml(e.target.value)
});
}
}.bind(this)
);
.then((response) => {
if (debugMode) {
log('Response SOAP: ', pd.xml(response.data));
}
return response.data;
})
.catch((e) => {