typesxml
Version:
Open source XML library written in TypeScript
41 lines • 1.2 kB
JavaScript
;
/*******************************************************************************
* 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.CData = void 0;
const Constants_1 = require("./Constants");
class CData {
value;
constructor(value) {
this.value = value;
}
setValue(value) {
this.value = value;
}
getValue() {
return this.value;
}
getNodeType() {
return Constants_1.Constants.CDATA_SECTION_NODE;
}
toString() {
return '<![CDATA[' + this.value + ']]>';
}
equals(node) {
if (node instanceof CData) {
return this.value === node.value;
}
return false;
}
}
exports.CData = CData;
//# sourceMappingURL=CData.js.map