-
Notifications
You must be signed in to change notification settings - Fork 1
/
x2js.d.ts
28 lines (27 loc) · 884 Bytes
/
x2js.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
export declare class X2JS {
constructor(options?: X2JSOptions);
parseXmlString(xmlDocStr: string): XMLDocument;
asArray(prop: any): any[];
toXmlDateTime(datetime: Date | number): string;
asDateTime(prop: string): Date;
xml2json(xmlDoc: XMLDocument): any;
xml_str2json(xmlDocStr: string): any;
json2xml_str(jsonObj: any): string;
json2xml(jsonObj: any): XMLDocument;
getVersion(): string;
}
export declare interface X2JSOptions {
escapeMode?: boolean;
attributePrefix?: string;
arrayAccessForm?: string;
emptyNodeForm?: string;
enableToStringFunc?: boolean;
arrayAccessFormPaths?: any[];
skipEmptyTextNodesForObj?: boolean;
stripWhitespaces?: boolean;
datetimeAccessFormPaths?: any[];
useDoubleQuotes?: boolean;
xmlElementsFilter?: any[];
jsonPropertiesFilter?: any[];
keepCData?: boolean;
}