【发布时间】:2015-12-02 14:38:08
【问题描述】:
我正在尝试使用 perl 提取此 html 文件中的表格。
我试过这个:
my $te = HTML::TableExtract->new();
$te->parse_file($g_log);
print "=====TE: $te ======\n";
输出是:
HTML:TableExtract = Hash(0x266f5f)
我尝试遍历 $te 并没有找到任何东西。任何人都可以指导下一步做什么。我是新手。
这是 HTML 文件:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:math="http://exslt.org/math"
xmlns:testng="http://testng.org">
<head xmlns="">
<title>TestNG Results</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
<meta http-equiv="pragma" content="no-cache"></meta>
<meta http-equiv="cache-control" content="max-age=0"></meta>
<meta http-equiv="cache-control" content="no-cache"></meta>
<meta http-equiv="cache-control" content="no-store"></meta>
<LINK rel="stylesheet" href="style.css"></LINK>
<script type="text/javascript" src="main.js"></script>
</head>
<body>
<h2>Test suites overview</h2>
<table width="100%">
<tr>
<td align="center" id="chart-container"><script type="text/javascript">
renderSvgEmbedTag(600, 200);
</script></td>
</tr>
</table>
</body>
</html>
【问题讨论】: