I am trying to parse an html link inside of a table.
Here is the html I am trying to hook:
<tr class="gray">
<td class="oq_sameOrder">&nbsp; </td><td class="oq_sameOrder"><a
href="item_query?item=109808113">L9808113</a></td><td
class="oq_sameOrder">NSS.HRPT.NN.D07135.S0859.E0908.B1022222.WI</
td><td class="oq_sameOrder">2007-05-15 13:58:34.0</td><td
class="oq_sameOrder">Pull Ready</td><td class="oq_sameOrder"><a
href="javascript:helpOpen('http://www.class.noaa.gov/download/A6031173/
NSS.HRPT.NN.D07135.S0859.E0908.B1022222.WI')">www </a>
<br>
<a href="javascript:helpOpen('ftp://ftp.class.noaa.gov/A6031173/
NSS.HRPT.NN.D07135.S0859.E0908.B1022222.WI')">ftp </a>&nbsp;</td>
</tr>

I am trying to get the ftp path/filename into a string. I loop over
all TD (each TD named oElement) until I make the following match:
Left(Trim(oElement.InnerText),4) = "NSS."

I then use parentElement and cell indexing to refer to the last cell
in the row:
oCell = oElement.parentElement.cells(5)

My problem is that I can not access the links inside of oCell.Why does
the following not work?:
oTags = oCell.All.Tags("A")
oLinkText = oTags(1).HREF

Re: Webtable parsing: nested A's in TD's by Tim

Tim
Tue May 15 22:21:03 CDT 2007

Have you tried

set oTags = oCell.getElementsByTagname("A")

?

Tim


"Brendan" <brendandetracey@yahoo.com> wrote in message
news:1179244212.370630.257690@y80g2000hsf.googlegroups.com...
>I am trying to parse an html link inside of a table.
> Here is the html I am trying to hook:
> <tr class="gray">
> <td class="oq_sameOrder">&nbsp; </td><td class="oq_sameOrder"><a
> href="item_query?item=109808113">L9808113</a></td><td
> class="oq_sameOrder">NSS.HRPT.NN.D07135.S0859.E0908.B1022222.WI</
> td><td class="oq_sameOrder">2007-05-15 13:58:34.0</td><td
> class="oq_sameOrder">Pull Ready</td><td class="oq_sameOrder"><a
> href="javascript:helpOpen('http://www.class.noaa.gov/download/A6031173/
> NSS.HRPT.NN.D07135.S0859.E0908.B1022222.WI')">www </a>
> <br>
> <a href="javascript:helpOpen('ftp://ftp.class.noaa.gov/A6031173/
> NSS.HRPT.NN.D07135.S0859.E0908.B1022222.WI')">ftp </a>&nbsp;</td>
> </tr>
>
> I am trying to get the ftp path/filename into a string. I loop over
> all TD (each TD named oElement) until I make the following match:
> Left(Trim(oElement.InnerText),4) = "NSS."
>
> I then use parentElement and cell indexing to refer to the last cell
> in the row:
> oCell = oElement.parentElement.cells(5)
>
> My problem is that I can not access the links inside of oCell.Why does
> the following not work?:
> oTags = oCell.All.Tags("A")
> oLinkText = oTags(1).HREF
>