xpath剔除所选部分中的元素
<article class="markdown-body">
<p class="xh-highlight"> </p>
<h2 id=" " class="xh-highlight"> </h2>
<p class="xh-highlight"> <code class="highlighter-rouge">gcc -g -O0 -fno-stack-protector -o vuln main.c</code>,<code class="highlighter-rouge">fno-stack-protector</code> </p>
<p class="xh-highlight"> </p>
<h2 id="参考" class="xh-highlight">参考</h2>
<ul class="xh-highlight">
</ul>
<section class="author-detail">
<section class="post-footer-item comment">
<a href="/comment.html?title=&article_id=/index.php/archives/777/" target="_blank">评论</a> | <a href="#" onclick="document.getElementById('wx-pay').style.display = ''; return false;">微信打赏</a> | 转载必须注明原文链接
</section>
<img src=" " style="max-width: 50%;max-height: 50%; display: none;" id="wx-pay">
</section>
</article>
payload1:
/html/body/div[@class='post-content']/article[@class='markdown-body']/*[not(self::section)]
payload2:
/html/body/div[@class='post-content']/article[@class='markdown-body']/*[not(name()="section")]
payload3:
/html/body/div[@class='post-content']/article[@class='markdown-body']/*[name(.)!="section"]