/** 解析 XML 字符串;文档包含语法错误时抛出异常。 */ export declare function parseXml(xml: string): Document; /** 读取节点文本并去除首尾空白;空节点返回空字符串。 */ export declare function textContent(node: Element | null | undefined): string; /** 读取元素属性;属性不存在时返回 undefined。 */ export declare function attr(node: Element | null | undefined, name: string): string | undefined; /** 判断元素是否匹配指定的 XML 本地名称。 */ export declare function matchesLocalName(node: Element | null | undefined, localName: string): boolean; /** 按 XML 本地名称查找第一个后代元素。 */ export declare function descendantByXmlLocalName(node: Element | null | undefined, localName: string): Element | null; /** 返回节点列表中的第一个元素节点。 */ export declare function firstElement(node: Element | null | undefined, selector: string): Element | null; /** 从节点列表中过滤出全部元素节点。 */ export declare function allElements(node: Element | null | undefined, selector: string): Element[]; /** 按本地名称查找第一个直接子元素。 */ export declare function childByLocalName(node: Element | null | undefined, localName: string): Element | null; /** 按本地名称返回全部直接子元素。 */ export declare function childrenByLocalName(node: Element | null | undefined, localName: string): Element[]; /** 按本地名称查找第一个后代元素,并兼容命名空间前缀。 */ export declare function descendantByLocalName(node: Element | null | undefined, localName: string): Element | null; /** 按本地名称返回全部后代元素,并兼容命名空间前缀。 */ export declare function descendantsByLocalName(node: Element | null | undefined, localName: string): Element[];