@types/xml-parser
Version:
TypeScript definitions for xml-parser
45 lines (34 loc) • 1.09 kB
Markdown
# Installation
> `npm install --save @types/xml-parser`
# Summary
This package contains type definitions for xml-parser (https://github.com/segmentio/xml-parser).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xml-parser.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xml-parser/index.d.ts)
````ts
declare function parse(xml: string): parse.Document;
declare namespace parse {
export interface Document {
declaration: Declaration;
root: Node;
}
export interface Declaration {
attributes: Attributes;
}
export interface Node {
name: string;
attributes: Attributes;
children: Node[];
content?: string | undefined;
}
export interface Attributes {
[name: string]: string;
}
}
export = parse;
````
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [Matt Frantz](https://github.com/mhfrantz).