开发者

How i can find a elements with tag table in a html page

I have the html page, and me need find some elements with tag a 'table', but such tables maybe more than one, and they don't have id or class name. Example:

<table>
<tbod开发者_开发技巧y>
<tr>
.....

<table>
<tbody>
<tr>
.....

<table>
<tbody> 
<tr>    <-------BINGO! 
.....

How i can it's do with help HtmlUnit? Thanks...


Use HtmlPage.getElementsByTagName("table") and iterate over the returned list of HtmlTable objects until you find the table you want to find.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜