import { Element } from 'libxmljs2'; type ElementPredicate = (e: Element) => boolean; type Query = string | string[] | ElementPredicate; export declare function queryAncestors(element: Element, query: Query): Element | undefined; export declare const byLocalName: (...names: string[]) => (element: Element) => boolean; export declare const byAttribute: (name: string, value: string) => (element: Element) => boolean; export declare const hasAttribute: (name: string) => (element: Element) => boolean; /** * Gets the value of an attribute from an XML element or returns a default * value. If the attribute doesn't exist and a default value isn't provided, it * will throw an Error. */ export declare function getAttribute(name: string, element: Element, defaultValue?: T): string | T; /** * Gets the value of an attribute from an XML element converted to a number or * returns a default value. If the attribute doesn't exist and a default value * isn't provided, it will throw an Error. */ export declare function getNumericAttribute(name: string, element: Element, defaultValue?: T): number | T; /** Helper function for generating `(.//e:foo | .//e:bar | .//e:baz)`-like XPath selectors. */ export declare function xpathOr(names: readonly string[]): string; export declare function getAnswerOptions(answer: Element): Element[]; export {}; //# sourceMappingURL=utils.d.ts.map