UNPKG

@cute-dw/core

Version:

This TypeScript library is the main part of a more powerfull package designed for the fast WEB software development. The cornerstone of the library is the **DataStore** class, which might be useful when you need a full control of the data, but do not need

47 lines (46 loc) 1.56 kB
export declare class XmlDocs { /** * Function that parses a string with specified mime type into an XML DOM, throwing an Error if XML parsing fails * * @param source String to be parsed * @param mime Supported mime-type * @returns XML Document object * * @private * @static */ private static _parse_xml; /** * Function that parses a XML-string into an XML DOM, throwing an Error if XML parsing fails * @param source XML-string to be parsed * @returns XML DOM object * @static */ static parseXML(source: string): XMLDocument; /** * Function that parses a SVG-string into an XML DOM, throwing an Error if XML parsing fails * * @param source SVG-string to be parsed * @returns XML DOM object * @static */ static parseSVG(source: string): XMLDocument; /** * Transforms XML node object to plain JavaScript object * @param node XML node object * @returns Object */ static nodeToObject(node: ChildNode): Object | null; /** * Changes the special xml-characters (if any) to its escaped counterparts * @param source The source string * @returns New string */ static escapeChars(source: string | null): string | null; /** * Changes the escaped special xml-characters (if any) to its normal view * @param source The source string * @returns New string */ static unescapeChars(source: string | null): string | null; }