export type XmlDocument = Document; export type XmlElement = Element; export type XmlNode = Node; export interface ParseOptions { /** Names the document kind in error messages (`Invalid DOCX XML: ...`); defaults to `OOXML`. */ label?: string; } /** * Parses an XML part into a DOM document. Parse errors throw (warnings do not), a missing root * throws, and DTD or entity declarations are rejected outright (no external or expanded entities). */ export declare function parseXml(xml: string, options?: ParseOptions): XmlDocument; export declare const buildXml: (document: XmlDocument) => string; export declare const isElement: (node: Node) => node is XmlElement; export declare const elements: (parent: ParentNode) => XmlElement[]; export declare const textContent: (element: XmlElement) => string; export declare const makeNS: (doc: XmlDocument, ns: string, qualified: string) => XmlElement; /** * Whether `element` has local name `local` in namespace `ns`. With `lenient`, an element with no * namespace also matches (hand-written test XML and some tools omit declarations). */ export declare function named(element: XmlElement | null | undefined, local: string, ns: string, lenient?: boolean): boolean; /** Direct child elements named `local` in `ns`. */ export declare const children: (parent: ParentNode, local: string, ns: string, lenient?: boolean) => XmlElement[]; /** The first direct child element named `local` in `ns`. */ export declare const first: (parent: ParentNode | null | undefined, local: string, ns: string, lenient?: boolean) => XmlElement | undefined; /** An attribute by namespace and local name, falling back to the `prefix:local` form. */ export declare function attr(element: XmlElement | null | undefined, local: string, ns: string, prefix: string): string | undefined; /** `r:id`-style relationship attribute (`id`, `embed`, `link`...) on an element. */ export declare const relAttr: (element: XmlElement | null | undefined, local: string) => string | undefined; //# sourceMappingURL=xml.d.ts.map