xml-from-object
Version:
Easy, highly typed and customizable way to build your xml using JS/TS plain objects.
20 lines (19 loc) • 832 B
TypeScript
import { FromObjectParams } from "./types";
/**
* Class way to transform a Javascript plain object into XML
*/
export declare class XmlFromObject {
/**
* Transform a Javascript plain object into XML
* @param {object} schemaConfig.schema - The typed schema with fields and configs to create the XML.
* @param {object} [schemaConfig.header] - (Optional) The xml header (typically "<?xml version...>").
*
*/
fromObject: typeof xmlFromObject;
}
/**
* Functional way to transform a Javascript plain object into XML
* @param {object} schemaConfig.schema - The typed schema with fields and configs to create the XML.
* @param {object} [schemaConfig.header] - (Optional) The xml header (typically "<?xml version...>").
*/
export declare function xmlFromObject(schemaConfig: FromObjectParams): string;