@types/xml-parser
TypeScript icon, indicating that this package has built-in type declarations

1.2.33 • Public • Published

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 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Matt Frantz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/xml-parser

Weekly Downloads

20,556

Version

1.2.33

License

MIT

Unpacked Size

3.52 kB

Total Files

5

Last publish

Collaborators

  • types