import { type X2jOptions, XMLBuilder, type XmlBuilderOptions } from 'fast-xml-parser'; export declare const XMLTagProcessor: (name: string, value: string) => string; export interface DOMContent { [index: string]: string | DOMContent | string[] | DOMContent[] | number | number[] | undefined; } export interface XMLKeys { a$?: Record; t$?: string; } export type DOMElementType = number | number[] | string | string[] | (BaseDOM & XMLKeys) | (BaseDOM & XMLKeys)[]; export interface BaseDOM { [key: string]: DOMElementType; } export type GenericDOMElement = BaseDOM & XMLKeys; export declare const GenericDOMArray: (element: GenericDOMElement | GenericDOMElement[]) => GenericDOMElement[]; /** * not sure why we have to do this, but filter attributes that * have value === undefined */ export declare const ScrubXML: (dom: DOMContent) => DOMContent; export declare const PatchXMLBuilder: (options: Partial) => XMLBuilder; /** * group attributes under `a$`, and don't add attribute prefixes (should be * implicit on that option, but hey). */ export declare const XMLOptions2: Partial; /** * some utility functions for working with the xml/json * objects we get from fast-xml-parser. */ export declare class XMLUtils { /** * @deprecated * * use the array version. it will run in approximately the same * amount of time for non-array structures, and it's safer in the * event you have an array somewhere in the node hierarchy. */ static FindChild(root: any | undefined, path: string): any; /** * the aim of this function is to handle the case where we don't * know where the arrays are -- any element in the path could be * multiple. for example, the path * * a/b/c * * could be reflected in xml as * * * * * * * * * or it could be * * * * * * * * * * * in either case we want both "c" elements. */ static FindAll(root: DOMContent | undefined, path: string): any[]; /** * how hard would it be to support wildcards? ... * basically if you see a wildcard, just treat every element as a * match -- right? */ static FindAllTail(root: DOMContent | DOMContent[], elements: string[]): DOMContent[]; }