SchemaXmlFileLocater Class
A SchemaLocater implementation for locating XML Schema files from the file system using configurable search paths. This is a workaround the current lack of a full xml parser.
Extends
Implements
Methods
Name | Description | |
---|---|---|
constructor(): SchemaXmlFileLocater | ||
getSchema<T extends Schema>(key: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Promise<undefined | T> | Attempts to retrieve a Schema with the given SchemaKey by using the configured search paths | |
getSchemaInfo(schemaKey: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Promise<undefined | SchemaInfo> | Gets the schema info which matches the provided SchemaKey. | |
getSchemaKey(data: string): SchemaKey | Constructs a SchemaKey based on the information in the Schema XML. | |
getSchemaSync<T extends Schema>(key: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): undefined | T | Attempts to retrieve a Schema with the given SchemaKey by using the configured search paths |
Inherited methods
Name | Inherited from | Description |
---|---|---|
addSchemaSearchPath(schemaPath: string): void Inherited | SchemaFileLocater | Add one search path used by this locator to find the |
addSchemaSearchPaths(schemaPaths: string[]): void Inherited | SchemaFileLocater | Adds more search paths used by this locator to find the |
compareSchemaKeyByVersion(lhs: FileSchemaKey, rhs: FileSchemaKey): number Inherited | SchemaFileLocater | Compares two Schema versions. |
fileExists(filePath: string): Promise<undefined | boolean> Inherited | SchemaFileLocater | |
fileExistsSync(filePath: string): undefined | boolean Inherited | SchemaFileLocater | |
findEligibleSchemaKeys(desiredKey: Readonly<SchemaKey>, matchType: SchemaMatchType, format: string): FileSchemaKey[] Protected Inherited | SchemaFileLocater | Attempts to find all Schema files in the configurable search paths that match |
readUtf8FileToString(filePath: string): Promise<undefined | string> Inherited | SchemaFileLocater | |
readUtf8FileToStringSync(filePath: string): undefined | string Inherited | SchemaFileLocater |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
searchPaths Inherited | string[] | SchemaFileLocater |
Defined in
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.