typesxml
Version:
Open source XML library written in TypeScript
37 lines • 1.06 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
*******************************************************************************/
import { Constants } from "./Constants.js";
export class CData {
value;
constructor(value) {
this.value = value;
}
setValue(value) {
this.value = value;
}
getValue() {
return this.value;
}
getNodeType() {
return Constants.CDATA_SECTION_NODE;
}
toString() {
return '<![CDATA[' + this.value + ']]>';
}
equals(node) {
if (node instanceof CData) {
return this.value === node.value;
}
return false;
}
}
//# sourceMappingURL=CData.js.map