Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(uriParm) {
this.baseFilename = path.basename(uriParm);
this.xmlSchemaNamespace = 'http://www.w3.org/2001/XMLSchema';
this.uri = uriParm;
var data = fs.readFileSync(this.uri);
this.xmlDoc = libxmljs.parseXml(data, { noblanks: true });
this.schemaElement = this.xmlDoc.root();
//this.includeUris = undefined;
//this.namespace = undefined;
//this.schemaNamespace = undefined;
//this.namespaces = undefined;
//this.targetNamespace = undefined;
this.loadNamespaces();
// this.dumpAttrs();
}
get baseFilename() {
export async function readAsync(manifestPath: string): Promise {
const contents = await fs.readFile(manifestPath, { encoding: 'utf8', flag: 'r' });
const manifest: Document = parseXml(contents);
return manifest;
}
fileStreams[0].pipe(concat((fileData) => {
try {
const fileString = fileData.toString("utf8");
const xmlDoc = libxmljs.parseXml(fileString, {
recover: true,
});
const matches = xmlDoc.find("//SCHEDA").map((node) => {
const match = searchByProps(node, propMap);
match.lang = "it";
return match;
});
callback(null, matches);
} catch (e) {
callback(e);
}
}));
},