UNPKG

typesxml

Version:

Open source XML library written in TypeScript

46 lines 1.43 kB
"use strict"; /******************************************************************************* * Copyright (c) 2023 - 2024 Maxprograms. * * This program and the accompanying materials * are made available under the terms of the Eclipse License 1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/org/documents/epl-v10.html * * Contributors: * Maxprograms - initial API and implementation *******************************************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); exports.ProcessingInstruction = void 0; const Constants_1 = require("./Constants"); class ProcessingInstruction { target; data; constructor(target, data) { this.target = target; this.data = data; } getTarget() { return this.target; } getData() { return this.data; } setData(data) { this.data = data; } getNodeType() { return Constants_1.Constants.PROCESSING_INSTRUCTION_NODE; } toString() { return '<?' + this.target + ' ' + this.data + '?>'; } equals(node) { if (node instanceof ProcessingInstruction) { return this.target === node.target && this.data === node.data; } return false; } } exports.ProcessingInstruction = ProcessingInstruction; //# sourceMappingURL=ProcessingInstruction.js.map