/** * Tiny dependency-free XML parser, scoped to what SVG needs. * * Runs anywhere (web worker, Node, browser) without relying on DOMParser, which * is unavailable in workers. It is deliberately lenient: it skips comments, * CDATA, processing instructions and DOCTYPE, decodes the basic entities, and * produces a simple element tree. It does not validate. */ export interface XmlNode { /** Local tag name, lowercased (namespace prefix stripped). */ tag: string; /** Attribute map; names kept verbatim (e.g. "xlink:href"). */ attrs: { [k: string]: string; }; children: XmlNode[]; } /** Parse an XML/SVG string into a root element tree (or undefined if none). */ export declare function parseXml(input: string): XmlNode | undefined;