sec-edgar-api
Version:
Fetch and parse SEC earnings reports and other filings. Useful for financial analysis.
19 lines (18 loc) • 671 B
TypeScript
export default class XMLParser {
private readonly selfEnclosingTags;
private readonly textSelectStrategy;
private readonly tagsToIgnore;
private readonly textConcatDivider;
constructor(params?: {
textSelectStrategy?: 'useFirst' | 'useLast' | 'concatenate';
textConcatDivider?: string;
});
mapAttributes(attributes: string[]): Map<string, string>;
parse(xml: string): any;
iterateXML(params: {
xml: string;
onOpenTag?: (tagName: string, attributes: string[], isSelfEnclosing: boolean) => void;
onCloseTag?: (tagName: string) => void;
onInnerText?: (text: string) => void;
}): void;
}