/** * fileUtils.ts * ───────────── * Async file-reading helpers that sit on top of the synchronous parsers. * * All functions are pure async/await over Node.js `fs/promises` – no * external dependencies. * * Exports * ─────── * readXmlFile(path, options?) → Promise * readXsdFile(path, loader?) → Promise * validateFiles(xmlPath, xsdPath, options?) → Promise * validateFilesWithLoader(xmlPath, xsdPath, loader, options?) */ import { ParseOptions } from '../parser/XmlParser'; import { SchemaLoader } from '../xsd/XsdParser'; import { ValidationOptions } from '../validator/ValidationEngine'; import { SchemaModel } from '../schema/SchemaModel'; import { XmlDocument } from '../parser/XmlNodes'; import { ValidationResult } from '../validator/ValidationResult'; /** * Read an XML file from disk and parse it into an XmlDocument. * * @param filePath Absolute or relative path to the `.xml` file. * @param options Optional XmlParser options (e.g. preserveWhitespace). */ export declare function readXmlFile(filePath: string, options?: ParseOptions): Promise; /** * Read an XSD file from disk and parse it into a SchemaModel. * * @param filePath Absolute or relative path to the `.xsd` file. * @param loader Optional SchemaLoader for xs:import / xs:include. * If omitted a **file-system loader** is created automatically * that resolves schemaLocation relative to `filePath`. */ export declare function readXsdFile(filePath: string, loader?: SchemaLoader): Promise; /** * Validate an XML file against an XSD file. Both files are read from disk. * * @param xmlPath Path to the XML file. * @param xsdPath Path to the XSD file. * @param options Optional ValidationOptions. */ export declare function validateFiles(xmlPath: string, xsdPath: string, options?: ValidationOptions): Promise; /** * Same as `validateFiles` but accepts an explicit SchemaLoader, useful when * xs:import / xs:include references external schemas not reachable from the * file-system (e.g. remote URLs pre-fetched by the caller). */ export declare function validateFilesWithLoader(xmlPath: string, xsdPath: string, loader: SchemaLoader, options?: ValidationOptions): Promise; //# sourceMappingURL=fileUtils.d.ts.map