load. Loading table from a file or HTTP-server

^table::load[filename
^table::load[
filename;loading options] 
^table::load[nameless;
filename]
^table::load[nameless;filename;loading options]

The constructor creates an object using the table stored in a file or a document on HTTP-server. The data in the file must be provided in tab-delimited format (see also
table::create).

Filename-name of file with path or document's URL on HTTP-server;

Loading options-for general options read "with HTTP-servers" section, there are additional options, see "Options of file format".

The usage of parameter
nameless is the same as in constructor table::create.

Example of loading table from disk

$loaded_table[^table::load[/addresses.cfg]]

The code given in example creates an object of class
table, containing named table stored in file addresses.cfg located in the root directory of the website.

Example of loading file from HTTP-server
$table[^table::load[nameless;http://www.parser.ru/;
   $.headers[

      $.
USER-AGENT[table load example]
   ]
]]
Number of rows: ^table.count[]
<hr />
<pre>
$table.0
</pre>


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 02.03.2011