typesxml
Version:
Open source XML library written in TypeScript
49 lines • 1.52 kB
JavaScript
/*******************************************************************************
* Copyright (c) 2023-2026 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public 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
*******************************************************************************/
export class RootAttributeHandler {
grammar;
rootSeen = false;
hasSchemaRef() {
return this.grammar !== undefined;
}
initialize() { }
setCatalog(_catalog) { }
startDocument() { }
endDocument() { }
xmlDeclaration(_version, _encoding, _standalone) { }
startElement(_name, _atts) {
if (!this.rootSeen) {
this.rootSeen = true;
return;
}
throw new Error('RootAttributeHandler: root seen');
}
endElement(_name) { }
internalSubset(_declaration) { }
characters(_ch) { }
ignorableWhitespace(_ch) { }
comment(_ch) { }
processingInstruction(_target, _data) { }
startCDATA() { }
endCDATA() { }
startDTD(_name, _publicId, _systemId) { }
endDTD() { }
skippedEntity(_name) { }
getCurrentText() { return ''; }
getGrammar() {
return this.grammar;
}
setGrammar(grammar) {
this.grammar = grammar;
}
}
//# sourceMappingURL=RootAttributeHandler.js.map