所以我是 Web-Harvest 的新手,我正在努力理解它,我有一个表格,其中包含以下 HTML 元素:
<table class="tablethings">
<thead>
<tr>
<th> Table of things</th>
</tr>
</thead>
<tr>
<td> Surprise box (red)</td>
</tr>
<tr>
<td> Flower </td>
</tr>
<tr>
<td> Toycar</td>
</tr>
<tr>
<td> Object,67</td>
</tr>
</tbody>
</table>
我通过循环获取表的所有元素:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<var-def name="webpage">
<html-to-xml>
<http url="http://somepage.www/tablepage"/>
</html-to-xml>
</var-def>
<loop item="currPro">
<list>
<xpath expression="//tr/td">
<var name="webpage"/>
</xpath>
</list>
<body>
<var name="currPro"></var>
</body>
</loop>
</config>
问题是我想将列表中的所有产品保存在一个 var-def 中,我想知道循环内部的逻辑是如何做到的