export interface XmlElement { /** Qualified name as written (`w:p`, `w:rPr`, `Relationship`). */ name: string; attrs: Record; children: XmlNode[]; } export type XmlNode = XmlElement | string; export declare function decodeEntities(s: string): string; /** Text escaped for an element body. */ export declare function escapeXml(s: string): string; /** Text escaped for a double-quoted attribute value. */ export declare function escapeAttr(s: string): string; /** The local part of a qualified name (`w:p` → `p`). */ export declare const localName: (name: string) => string; /** Parse an XML document; returns its root element. */ export declare function parseXml(source: string): XmlElement; /** Child elements of `el` (by local name when given). */ export declare function children(el: XmlElement | undefined, local?: string): XmlElement[]; /** The first child element of `el` with this local name. */ export declare function child(el: XmlElement | undefined, local: string): XmlElement | undefined; /** Every descendant element with this local name, in document order. */ export declare function descendants(el: XmlElement, local: string, out?: XmlElement[]): XmlElement[]; /** An attribute by local name (`w:val` and `val` both answer `val`). */ export declare function attr(el: XmlElement | undefined, local: string): string | undefined; /** The concatenated text of an element. */ export declare function textOf(el: XmlElement): string; /** A WordprocessingML on/off property (``, ``): * undefined when the element is absent. */ export declare function onOff(el: XmlElement | undefined): boolean | undefined; //# sourceMappingURL=xml.d.ts.map