typesxml
Version:
Open source XML library written in TypeScript
46 lines • 1.44 kB
JavaScript
;
/*******************************************************************************
* Copyright (c) 2023-2026 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_js_1 = require("./Constants.js");
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_js_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