TsmDatabase* tsmReadDatabase ( char *location ) Reads a dataset database file
Reads a dataset database file.This function takes a URL for a dataset database file and attempts to parse this into a TsmDatabase structure. The parsing routine will check for the following errors in the database file, causing a NULL return pointer:
- </tag> before a <tag>
- nesting of <tag> blocks
- <tag> without a </tag>
- <instance> can only occur inside <dataset>
- check that <tag> contains all required fields when </tag> found
- keyword/value pairs only valid inside appropriate <tag> group
- min/max-resolution values without a unit string
- check that min-resolution <= max_resolution
- invalid type value
- unparsable URLs for location fields
The format used for the dataset database file is described at: http://www.ai.sri.com/~magic/tsmApi/dataset-db.html