forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xml-parser.d.ts
33 lines (26 loc) · 704 Bytes
/
xml-parser.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
// Type definitions for xml-parser 1.2.1
// Project: https://github.com/segmentio/xml-parser
// Definitions by: Matt Frantz <https://github.com/mhfrantz/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'xml-parser' {
function parse(xml: string): parse.Document;
module parse {
export interface Document {
declaration: Declaration;
root: Node;
}
export interface Declaration {
attributes: Attributes;
}
export interface Node {
name: string;
attributes: Attributes;
children: Node[];
content?: string;
}
export interface Attributes {
[name: string]: string;
}
}
export = parse;
}