How to use the @hpcc-js/util.XMLNode 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 / eclMeta.ts View on Github external
constructor(xmlSource: XMLNode) {
        super(xmlSource.$.name, "source", xmlSource.$.sourcePath, xmlSource.children("Definition"));
        const nameParts = xmlSource.$.name.split(".");
        nameParts.pop();
        const fakeNode = new XMLNode("");
        fakeNode.appendAttribute("name", "$");
        fakeNode.appendAttribute("ref", nameParts.join("."));
        this.imports = [
            new Import(fakeNode),
            ...this.parseImports(xmlSource.children("Import"))
        ];
    }
github hpcc-systems / Visualization / packages / comms / src / ecl / workunit.ts View on Github external
debug(command: string, opts?: object): Promise {
        if (!this.isDebugging()) {
            return Promise.resolve(new XMLNode(command));
        }
        return this.WUCDebug(command, opts).then((response: XMLNode) => {
            const retVal: XMLNode[] = response.children(command);
            if (retVal.length) {
                return retVal[0];
            }
            return new XMLNode(command);
        }).catch((_) => {
            logger.error(_);
            return Promise.resolve(new XMLNode(command));
        });
    }
github hpcc-systems / Visualization / packages / comms / src / ecl / workunit.ts View on Github external
}).catch((_) => {
            logger.error(_);
            return Promise.resolve(new XMLNode(command));
        });
    }
github hpcc-systems / Visualization / packages / comms / src / ecl / workunit.ts View on Github external
return this.WUCDebug(command, opts).then((response: XMLNode) => {
            const retVal: XMLNode[] = response.children(command);
            if (retVal.length) {
                return retVal[0];
            }
            return new XMLNode(command);
        }).catch((_) => {
            logger.error(_);