How to use the @hpcc-js/util.xml2json function in @hpcc-js/util

To help you get started, we’ve selected a few @hpcc-js/util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hpcc-systems / Visualization / packages / comms / src / clienttools / eclcc.ts View on Github external
return new Promise((resolve, _reject) => {
            const fileData = fs.readFileSync(filePath, "ascii");
            const retVal = xml2json(fileData as any);
            if (removeOnRead) {
                fs.unlink(filePath, (err) => { });
            }
            resolve(retVal);
        });
    }
github hpcc-systems / Visualization / packages / comms / src / services / wsWorkunits.ts View on Github external
return this._connection.send("WUCDebug", request).then((response) => {
            const retVal = xml2json(response.Result);
            const children = retVal.children();
            if (children.length) {
                return children[0];
            }
            return null;
        });
    }