npm.io
1.2.33 • Published 2 years ago

@types/xml-parser

Licence
MIT
Version
1.2.33
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

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

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 1536 GMT
  • Dependencies: none

Credits

These definitions were written by Matt Frantz.