ECSchemaXmlContext Class
Context used when deserializing a Schema from an XML file. A schema may contain references to other schemas, which may reside elsewhere on the local disk than the referencing schema. The context maintains a list of directories ("search paths") to search for referenced schemas. Directories can be appended to the list via addSchemaPath. When a referenced schema needs to be located, the list of directories is searched in the order in which each was added. Once located, the schema is cached to avoid performing repeated lookups in the file system.
@see readSchemaFromXmlFile to deserialize a schema.
Methods
Name | Description | |
---|---|---|
constructor(): ECSchemaXmlContext | Construct a context with an empty list of search paths. | |
addSchemaPath(searchPath: string): void | Append a directory to the list of directories that will be searched to locate referenced schemas. | |
readSchemaFromXmlFile(filePath: string): any | Deserialize a Schema from an ECSchemaXML-formatted file. |
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.