forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmltojson.d.ts
34 lines (30 loc) · 1.09 KB
/
xmltojson.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
29
30
31
32
33
34
// Type definitions for xmltojson
// Project: https://github.com/metatribal/xmlToJSON
// Definitions by: Travis Crowe <https://github.com/traviscrowe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'xmltojson' {
export = xmltojson;
namespace xmltojson {
function grokType(sValue: any): any;
function parseString(xmlString: string, opt: Options): Object;
function parseXml(oXMLParent: Document, opt: Options): Object;
function xmlToString(xmlDoc: Document): string;
function stringToXml(xmlString: string): Document;
interface Options {
mergeCDATA?: boolean,
grokAttr?: boolean,
grokText?: boolean,
normalize?: boolean,
xmlns?: boolean,
namespaceKey?: string,
textKey?: string,
valueKey?: string,
attrKey?: string,
cdataKey?: string,
attrsAsObject?: boolean,
stripAttrPrefix?: boolean,
stripElemPrefix?: boolean,
childrenAsArray?: boolean
}
}
}