Dealing with HTML Tables
Devin Asay
devin_asay at byu.edu
Fri Oct 8 13:49:06 EDT 2004
Okay, I'm just brainstorming here about how to parse text in HTML
tables to make it neat and readable in a Rev field or fields. A couple
of approaches occur to me:
- Download the html file, and basically use tabs and returns to
separate the text in a coherent way. This is easy but could turn out
messy.
- Parse out the table cell contents and put it into the cells of a
table field. Might work, but seems like it wouldn't handle non-tabular
text well.
- Dynamically create text fields and table fields as needed, based on
how the html file parses out, use the characteristics of the text
(textSize, formattedHeight, formattedWidth, etc.) to set the fields to
be large enough to display the all of the text or table without
scrolling. Then stack the fields top to bottom and group them in a
group with a vertical scrollbar and scroll the group instead of the
field. Might work but might be complicated to program. Maybe
performance hits here?
Has anyone tried to do something like this? I noticed Xavier in
DiscreteBrowser uses the first approach. Any ideas? The idea is not to
exactly duplicate html tables, but to render the text in tables in a
pleasing and readable way.
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list