UNPKG

tei-util

Version:

Utility functions for dealing with TEI in JavaScript

27 lines (26 loc) 673 B
import { TEIConfig, TEIDocument } from './types'; export declare type XMLElement = { tag: string; children: XMLElement[]; text: string | null; attributes: { [x: string]: string; }; }; export declare class TEISerialiser { private sections; private elements; private attributes; constructor(config: TEIConfig); serialise(doc: TEIDocument): string; private serialiseNestedDocs; private buildBaseElement; private buildElement; private buildAttributes; private buildNodeElement; private buildMarkElement; private textDoc2tree; private mergeTree; private serialiseTree; private xmlEscape; }