【发布时间】:2013-08-04 07:25:11
【问题描述】:
我是 python 和 xpath 的新手, 我有一个这样的html代码:
<a name="hello"></a>
<h3>hello</h3>
<table />
<a name="impact"></a>
<h3>Impact</h3>
<table cellspacing="0" cellpadding="0" border="0" class="wrapper-table"><tr> <td><p>An unauthenticated attacker using a specifically crafted payload may be able to trick the Ruby on Rails backend into executing arbitrary code.</p></td></tr></table>
我想将整个表格及其所有标签和文本以及...保存在一个字符串中。 我想要影响标题之后的表格标签。
【问题讨论】:
标签: xpath python-2.7 lxml