HTML association table extractor
From WandoraWiki
(Difference between revisions)
Line 9: | Line 9: | ||
|- | |- | ||
| Country | | Country | ||
− | | | + | | Finland |
− | | | + | | Sweden |
− | + | ||
− | + | ||
|- | |- | ||
+ | | Capital | ||
| Helsinki | | Helsinki | ||
| Stockholm | | Stockholm | ||
|- | |- | ||
+ | | Government | ||
| Parliamentary democracy | | Parliamentary democracy | ||
| Constitutional monarchy | | Constitutional monarchy | ||
|- | |- | ||
+ | | Area | ||
| 338,145 km2 | | 338,145 km2 | ||
| 449,964 km2 | | 449,964 km2 | ||
|- | |- | ||
+ | | Population | ||
| 5,297,316 | | 5,297,316 | ||
| 9,142,817 | | 9,142,817 | ||
|} | |} |
Revision as of 20:10, 22 January 2008
HTML association table extractor is a cousin of HTML property table extractor. Both read simple HTML fragments containing table, tr, and td elements and convert table content to associations.
HTML association table extractor interprets first table row as a list of roles used in associations. Subsequent table rows are interpreted as associations. Each table cell is interpret either as a role or a player of the association.
Extractor can't handle cell merges caused by cellspan and rowspan attributes used in table elements. Also, the extractor doesn't handle nested HTML tables. For example consider rather typical table
Country | Finland | Sweden |
Capital | Helsinki | Stockholm |
Government | Parliamentary democracy | Constitutional monarchy |
Area | 338,145 km2 | 449,964 km2 |
Population | 5,297,316 | 9,142,817 |