@aurahelper/languages
Version:
Language Libraries to work with XML, Aura, Apex... files. tokenizers, parsers, system classes and much more
50 lines (49 loc) • 1.71 kB
TypeScript
/**
* Class with utils methos to use when analize XML Files
*/
export declare class XMLUtils {
/**
* Method to Clean an XML file
* @param {any} xmlDefinition XML File Definition
* @param {any} [xmlData] XML File parsed data
* @returns {any} Return the content file cleaned
*/
static cleanXMLFile(xmlDefinition: any, xmlData?: any): any;
/**
* Method to create an XML file using XML definition
* @param {any} xmlMetadata XML file definition
* @returns {any} Return the XML created file (as JSON object)
*/
static createXMLFile(xmlMetadata: any): any;
/**
* Method to force xml element to be an array
* @param {any} element XML element
* @returns {any} Return the element on array
*/
static forceArray(element: any): any[];
/**
* Method to sort XML files
* @param {any[]} elements elements to sort
* @param {string[]} fields fields to use to sort data
* @returns {any[]} Return the elements sorted
*/
static sort(elements: any[], fields?: string[]): any[];
/**
* Method to get XML field attributes
* @param {any} data XMLField data
* @returns {string[]} Return the attribute list as XML format
*/
static getAttributes(data: any): string[];
/**
* Method to get tag text
* @param {any} data XML Tag data
* @returns {string | undefined} Return text data
*/
static getText(data: any): any;
/**
* Method to get N tabs
* @param {number} nTabs Tabs number
* @returns {string} Retunr a text with N tabs symbols (\t)
*/
static getTabs(nTabs: number): string;
}