UNPKG

typesxml

Version:

Open source XML library written in TypeScript

42 lines 1.25 kB
/******************************************************************************* * 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 *******************************************************************************/ import { Constants } from "./Constants.js"; export 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.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; } } //# sourceMappingURL=ProcessingInstruction.js.map