export interface IText { nodeValue: string | null; } export interface IElement { readonly tagName: string; childNodes: { length: number; [index: number]: IElement | IText; }; toString: () => string; } /** * Decode an XML string. * * @param xml XML string. * @returns Decoded declaration, doctype, and document element. */ export declare function xmlDecode(xml: string): { declaration: string | null; doctype: string | null; documentElement: Readonly; }; /** * List XML element child elements. * Throws if non-whitespace nodes are found. * * @param element XML element. * @returns XML element list. */ export declare function xmlElementChildElements>(element: T): T[]; /** * Get the XML element text node. * Returns null if none, throws if multiple elements. * * @param element XML element. * @returns XML text node list. */ export declare function xmlElementText(element: Readonly): IText | null; /** * Assert XML element has no children. * * @param element XML element. * @param tagName XML element tag name. */ export declare function assertXmlTagName(element: Readonly, tagName: string): void; /** * Assert XML element has no children. * * @param element XML element. */ export declare function assertNoXmlElementChildNodes(element: Readonly): void; /** * Base64 encode function mirroring decode function. * * @param data Byte array. * @returns Base64 string. */ export declare function base64Encode(data: Uint8Array): string; /** * Base64 decode function that matches plist parsing behavior. * * @param base64 Base64 string. * @returns Byte array. */ export declare function base64Decode(base64: string): Uint8Array;