HTML association table extractor

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
Line 9: Line 9:
 
|-
 
|-
 
| Country
 
| Country
 +
| Capital
 +
| Government
 +
| Area
 +
| Population
 +
|-
 
| Finland
 
| Finland
 +
| Helsinki
 +
| Parliamentary democracy
 +
| 338,145 km2
 +
| 5,297,316
 +
|-
 
| Sweden
 
| Sweden
|-
 
| Capital
 
| Helsinki
 
 
| Stockholm
 
| Stockholm
|-
 
| Government
 
| Parliamentary democracy
 
 
| Constitutional monarchy
 
| Constitutional monarchy
|-
 
| Area
 
| 338,145 km2
 
 
| 449,964 km2
 
| 449,964 km2
|-
 
| Population
 
| 5,297,316
 
 
| 9,142,817
 
| 9,142,817
 
|}
 
|}

Revision as of 20:40, 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 Capital Government Area Population
Finland Helsinki Parliamentary democracy 338,145 km2 5,297,316
Sweden Stockholm Constitutional monarchy 449,964 km2 9,142,817
Personal tools