Является ли кодировка/xml лучшей библиотекой для синтаксического анализа файлов таблицы HTML, подобных этому, и есть примеры того, как это сделать?Анализ HTML-файлов с помощью Go
<html><head>
<meta charset="utf-8">
</head>
<body>
<a name="Test1">
<center>
<b>Test 1</b> <table border="0">
<tbody><tr>
<th> Type </th>
<th> Region </th>
</tr>
<tr>
<td> <table border="0">
<thead>
<tr>
<th><b>Type</b></th>
<th> </th>
<th> Count </th>
<th> Percent </th>
</tr>
</thead>
<tbody><tr>
<td> <b>T1</b> </td>
<th> </th>
<td class="numeric" bgcolor="#ff0000"> 34,314 </td>
<td class="numeric" bgcolor="#ff0000"> 31.648% </td>
</tr>
<tr>
<td> <b>T2</b> </td>
<th> </th>
<td class="numeric" bgcolor="#bf3f00"> 25,820 </td>
<td class="numeric" bgcolor="#bf3f00"> 23.814% </td>
</tr>
<tr>
<td> <b>T3</b> </td>
<th> </th>
<td class="numeric" bgcolor="#24da00"> 4,871 </td>
<td class="numeric" bgcolor="#24da00"> 4.493% </td>
</tr>
</tbody></table><br>
</td>
<td> <table border="0">
<thead>
<tr>
<th><b> Type</b></th>
<th> </th>
<th> Count </th>
<th> Percent </th>
</tr>
</thead>
<tbody><tr>
<td> <b>T4</b> </td>
<th> </th>
<td class="numeric" bgcolor="#ff0000"> 34,314 </td>
<td class="numeric" bgcolor="#ff0000"> 31.648% </td>
</tr>
<tr>
<td> <b>T5</b> </td>
<th> </th>
<td class="numeric" bgcolor="#53ab00"> 11,187 </td>
<td class="numeric" bgcolor="#53ab00"> 10.318% </td>
</tr>
<tr>
<td> <b>T6</b> </td>
<th> </th>
<td class="numeric" bgcolor="#bf3f00"> 25,820 </td>
<td class="numeric" bgcolor="#bf3f00"> 23.814% </td>
</tr>
</tbody></table><br>
</td>
</tr>
</tbody></table>
</center>
</a>
</body></html>
Заранее спасибо.
Вы пробовали http://godoc.org/code.google.com/p/go.net/html - первый результат Google для «golang html parser»;) – elithrar