Skip to main content

Class: Parser

Constructors​

constructor​

β€’ new Parser(Β«destructuredΒ»?)

Parameters​

NameType
Β«destructuredΒ»IParserOptions

Defined in​

src/Parser.ts:26

Properties​

fetch​

β€’ Private Readonly fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

Type declaration​

β–Έ (input, init?): Promise<Response>

Parameters​
NameType
inputRequestInfo | URL
init?RequestInit
Returns​

Promise<Response>

Defined in​

src/Parser.ts:23


DOMParser​

β€’ Private Readonly DOMParser: () => DOMParser

Type declaration​

β€’ new DOMParser(): DOMParser

Returns​

DOMParser

Defined in​

src/Parser.ts:24

Methods​

parse​

β–Έ parse(resource): Promise<Document>

Parameters​

NameType
resourcestring

Returns​

Promise<Document>

Defined in​

src/Parser.ts:42


parseFromString​

β–Έ parseFromString(xml): Document

Parameters​

NameType
xmlstring

Returns​

Document

Defined in​

src/Parser.ts:50


checkDocument​

β–Έ Private checkDocument(document): Document

Parameters​

NameType
documentDocument

Returns​

Document

Defined in​

src/Parser.ts:64


load​

β–Έ load(url): Promise<Document>

Parameters​

NameType
urlstring

Returns​

Promise<Document>

Defined in​

src/Parser.ts:74