export declare class XMLElement { elem: any; constructor(elem: any); attr(name: string): string | null; text(): string | null; get tagName(): string; children(): XMLElements; prop(name: string): any; find(selector: string): XMLElements; } export declare class XMLElements { elems: XMLElement[]; constructor(elems: XMLElement[]); forEach(callbackfn: (value: XMLElement, index: number, array: XMLElement[]) => void): void; /** * Forward the array iterator, which allow to do this * * ```ts * const parent: XMLElement = getParent() * const elements: XMLElements = parent.children() * for (const element of elements) { * // do things * } * ``` * * The method behave the same way as `forEach`. Here is the equivalent: * ```ts * const parent: XMLElement = getParent() * const elements: XMLElements = parent.children() * elements.forEach((element) => { * // do things * }) * ``` * * The main advantage of using an iterator is that we can use promise and async/await with * it nativelly, where the `forEach` can't without causing side-effects. * * Here is the [Iterator documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators) * @returns */ [Symbol.iterator](): ArrayIterator; some(callbackfn: any): boolean; map(callbackfn: any): T[]; attr(name: string): string | null; text(): string | null; find(selector: string): XMLElements; first(): XMLElement | null; prop(name: string): any; get length(): number; } declare const _default: (element: any, ns?: DOMParserSupportedType) => XMLElement; export default _default; //# sourceMappingURL=xmlParser.d.ts.map