Skip to main content

DataModel.parseFile() method

Reads and parses the specified XML file, returning the parsed content.

Signature

parseFile({ fileName }: {
fileName: string;
}): Promise<any>;

Parameters

Parameter

Type

Description

{ fileName }

{ fileName: string; }

Returns

Promise<any>

A promise that resolves to the parsed XML content

Remarks

This method constructs the full file path using the configured input folder, reads the XML file as a UTF-8 string, and parses it using the configured XML parser. The method increments the internal counter for parsed files and, if verbose mode is enabled, logs the file being parsed.