sec-edgar-api
Version:
Fetch and parse SEC earnings reports and other filings. Useful for financial analysis.
44 lines (43 loc) • 1.21 kB
TypeScript
import { DocumentNode } from './XMLNode/DocumentNode';
interface OnCharacterData {
char: string;
index: number;
path: string;
pathOccurrenceCount: number;
attributesStr: string;
}
interface ParseTableNodesParams {
xml: string;
}
interface Parse2Params {
xml: string;
onCharacter?: (data: OnCharacterData) => void;
onOpenTag?: (data: OnCharacterData) => void;
onCloseTag?: (data: OnCharacterData) => void;
}
interface IterateTablesParams {
xml: string;
parentPath?: string;
trimSpaces?: boolean;
onCharacter?: (data: OnCharacterData & {
textMap: Map<string, string>;
}) => void;
onOpenTag?: (data: OnCharacterData & {
textMap: Map<string, string>;
}) => void;
onCloseTag?: (data: OnCharacterData & {
textMap: Map<string, string>;
}) => void;
}
/**
* @deprecated use XMLParser
*/
export default class XMLParserLegacy {
iterateXML(params: Parse2Params): string[];
/**
* Returns text in each table cell mapped by `${table}.${row}.${col}`
*/
getTableTextMap(params: IterateTablesParams): Map<string, string>;
getDocumentNode(params: ParseTableNodesParams): DocumentNode;
}
export {};