@mos-connection/helper
Version:
Helper functions for the MOS-connection library
16 lines • 1.04 kB
TypeScript
import * as XMLBuilder from 'xmlbuilder';
import { AnyXMLValue, IMOSDuration, IMOSString128, IMOSTime } from '@mos-connection/model';
import { MosModel } from '..';
export declare function xml2js(messageString: string): MosModel.AnyXMLObject;
export declare function addTextElement(root: XMLBuilder.XMLElement, elementName: string, text?: string | number | null | IMOSString128 | IMOSTime | IMOSDuration, attributes?: {
[key: string]: string;
}, strict?: boolean): XMLBuilder.XMLElement;
export declare function addTextElementInternal(root: XMLBuilder.XMLElement, elementName: string, content: AnyXMLValue | number | null | IMOSString128 | IMOSTime | IMOSDuration, attributes: {
[key: string]: string | undefined;
} | undefined, strict: boolean): XMLBuilder.XMLElement;
/**
* Utility-function to convert a XMLBuilder.XMLElement into the generic object which can be sent
* into the ***.fromXML(xml:any) methods in MosModel
*/
export declare function xmlToObject(root: XMLBuilder.XMLElement): any;
//# sourceMappingURL=Utils.d.ts.map