import { XmlDocument, XmlElement } from '@rgrove/parse-xml'; export declare class XmlParseError extends Error { constructor(message: any); } /** * Parses a XML document as string, return a document object */ export declare function parseXmlString(xmlString: string): XmlDocument; /** * Will do nothing if no namespace present * @param {string} name * @return {string} */ export declare function stripNamespace(name: any): any; export declare function getRootElement(xmlDoc: XmlDocument): XmlElement; export declare function getElementName(element: XmlElement): string; /** * Will return all matching elements (namespace will be ignored) * @param element Element to look into * @param name element name * @param [nested] if true, will lookup children of children too * @return Returns an empty array if no match found */ export declare function findChildrenElement(element: XmlElement, name: string, nested?: boolean): XmlElement[]; /** * Will return the first matching element * @param element Element to look into * @param name element name * @param [nested] if true, will lookup children of children too * @return Returns null if no matching element found */ export declare function findChildElement(element: XmlElement, name: string, nested?: boolean): XmlElement; /** * Will return all children elements * @param {XmlElement} element Element to look into * @return {XmlElement[]} Returns empty array if no element found */ export declare function getChildrenElement(element: XmlElement): XmlElement[]; /** * Returns the text node in the element. Note that giving an null element * will simply return an empty string. * @param element * @return found text or empty string if no text node found */ export declare function getElementText(element: XmlElement): string; /** * Returns the element's attribute value. Note that giving an null element * will simply return an empty string. * @param element * @param attrName * @return found attribute value or empty if non-existent */ export declare function getElementAttribute(element: XmlElement, attrName: string): string; //# sourceMappingURL=xml-utils.d.ts.map