Corda.com
HTML Table Data
Corda Server can import data directly from HTML tables within web pages. This process is sometimes referred to as screen-scraping. All you have to do is tell Corda Server the location of the web page and the name or number of the table from which you want to import data, and Corda Server will import the data from that table directly into a graph or map.
For example, consider the following HTML table.
| Arrivals | Departures | Unused | Out of Commission | |
| Atlanta | 23 | 36 | 11 | 7 |
| Boston | 41 | 17 | 25 | 9 |
This table is named Spreadsheet (the value of the name attribute in the table tag).
You could import data from this table using the Corda Embedder loadData() command, as shown below:
myImage.loadData("graph", "http://www.corda.com/devzone/data_method/ html_table/", "", "Spreadsheet");
For maps, you would use the loadMapData() command, as shown below:
myImage.loadMapData("US", "Points", "http://www.corda.com/devzone/data_method/ html_table/", "", "Spreadsheet");
To see example code that imports data from HTML tables, view your web environment below:
| Web Environment | Application | Code Examples |
| ASP | PopChart | Dynamic Graphs |
| ASP.NET | PopChart | Dynamic Graphs |
| ColdFusion | PopChart | Dynamic Graphs |
| JSP | PopChart | Dynamic Graphs |
| JSP Tag Library | PopChart | Dynamic Graphs |
| Java Servlet | PopChart | Dynamic Graphs |
| JavaScript | PopChart | Dynamic Graphs |
| Perl | PopChart | Dynamic Graphs |
| PHP | PopChart | Dynamic Graphs |
For more information on importing data from tables in web pages, refer to Chapter 5 of the PopChart and OptiMap Web Development manual.
