File::loadXMLOrCreate()
Browser availability: desktop-only.
This API requires the desktop runtime. Browser declarations may report the limitation without performing the operation.
Loads an object of the specified class from an XML file at the given path, or creates a new one if the file does not exist.
Syntax
Java
.loadXMLOrCreate(path, cls)
Parameters
| Name | Data Type | Description |
|---|---|---|
| path | String | the path to the XML file |
| cls | Class<T> | the class of the object to be loaded |
Return
T