Data IO
[Desktop Automation]
These methods of the system object handle XML, JSON, CSV, plaintext, and database connections.
Methods
| Name | Syntax | Description |
|---|---|---|
| createarray | Array = System:createarray | Creates a TLUAarray |
| connecttoodbc | DBConnection = system:connecttoodbc(connectionstring (DSN), login:String, password:String); | Connects to an ODBC datasource [Desktop Automation] |
| createcsv | CSVObject = system:createcsv(clearexisting:Boolean) | Creates a CSVObject; if clearexisting is TRUE, a subsequent write overwrites any existing file. |
| createjson | Jsonfile = system:createjson(); | Creates an empty Json file in memory |
| createtextfile | textfile = system:createtextfile(); | Creates an empty text file in memory |
| createxml | xml = system:createxml(); | Creates an empty XML structure in memory |
| loadjson | Jsonfile = system:loadjson(filename:String); | Loads a JSON file from a file |
| loadjsonfromurl | Jsonfile = system:loadjsonfromurl(URL:String); | Loads a JSON file from a URL |
| loadtextfile | textfile = system:loadtextfile(filename:String); | Loads a text file from disk |
| loadxml | Xmlfile = system:loadxml(filename:String; UseAttributesAsChildren:Boolean); | Loads an XML file from disk. If UseAttributesAsChildren is true, attributes are used as children. The default value is true. |
| loadxmlfromstring | xml = system:loadxml(string:String) | Loads an XML file from a string |
| loadxmlfromurl | xml = system:loadxml(URL:String); | Loads an XML file from an URL |
Examples
| Name | Example | Return value |
|---|---|---|
| createxml | xmlobject = system:createxml(); | |
| loadxml | xmlobject = system:loadxml("input.xml"); | |
| connecttoodbc | dbobject = system:connecttoodbc(databasename:String, user:String, password:String); | dbobject: Database object for further processing |
