12-28-2012, 06:21 PM
Looks like the id is duplicated in two different tables.
Of course, I can't change the HTML source.
Is there a way to specify which <th> tag to get the text from?
Here is an abbreviated example that re-creates the failure:
Macro Macro
Of course, I can't change the HTML source.
Is there a way to specify which <th> tag to get the text from?
Here is an abbreviated example that re-creates the failure:
Macro Macro
str w=
;<html><head></head><body>
;<table>
;<th id='grdTCardDtl_c_0_1' columnNo='1' height='30px' class="ig_6a760250_r4 ig_6a760250_2"><nobr>Dist. Code</nobr></th>
;</table>
;<table>
;<th id='grdTCardDtl_c_0_1' columnNo='1' height='30px' class="ig_6a760250_r4 ig_6a760250_2"> </th>
;</table>
;</body></html>
str s
HtmlDoc doc
doc.InitFromText(w)
s=doc.GetText("th" "grdTCardDtl_c_0_1")
out s