UNPKG

typesxml

Version:

Open source XML library written in TypeScript

55 lines (54 loc) 2.12 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 { Writable } from "node:stream"; import { Catalog } from "../Catalog.js"; import { ContentHandler } from "../ContentHandler.js"; import { Grammar } from "../grammar/Grammar.js"; import { XMLAttribute } from "../XMLAttribute.js"; export declare class XmlEventStreamWriter implements ContentHandler { private readonly output; private readonly encoding; private readonly autoClose; private elementStack; private catalog; private grammar; private xmlVersion; private inCDATA; private dtdOpen; private dtdHasSubset; private completed; constructor(output: Writable, encoding?: BufferEncoding, autoClose?: boolean); initialize(): void; setCatalog(catalog: Catalog): void; setGrammar(grammar: Grammar | undefined): void; getGrammar(): Grammar | undefined; getCurrentText(): string; startDocument(): void; endDocument(): void; xmlDeclaration(version: string, encoding: string, standalone: string | undefined): void; startElement(name: string, atts: Array<XMLAttribute>): void; endElement(name: string): void; internalSubset(declaration: string): void; characters(ch: string): void; ignorableWhitespace(ch: string): void; comment(ch: string): void; processingInstruction(target: string, data: string): void; startCDATA(): void; endCDATA(): void; startDTD(name: string, publicId: string, systemId: string): void; endDTD(): void; skippedEntity(name: string): void; private prepareForChildContent; private prepareForTextContent; private closePendingStartTag; private write; }