当前位置:网站首页>[XPath] use following sibling to obtain the following peer nodes

[XPath] use following sibling to obtain the following peer nodes

2022-06-10 22:33:00 micromicrofat

Below html Code as an example , Try to use xpath extract “2022 year 06 month 07 Japan ”

<div class="news_body">
  <ul class="news_tel_z">
    <div class="news_tel">
      2022 year 6 month 7 Japan 
    </div>
    <div class="news_tel_2" style="height: auto">
      <div class="news_laiyuan"> source :
      </div> Apple
      <div class="news_laiyuan2">
         Update time :
      </div>
      2022 year 06 month 07 Japan                     
      <br>
      <div class="news_laiyuan"> keyword :
      </div>WWDC 2022
    </div>
    <div class="news_tex" style="margin-top: 10px;">
      <div style="background-color: #EAF0F2; margin: 6px 0px; padding: 15px; border: solid 1px #95B2C0; line-height: 24px; overflow: auto;">
        <p style="text-indent:2em;">
        </p>
      </div>
      <p style="color:#9e9e9f; padding-top:8px; padding-left:5px;">
      </p>
    </div>
  </ul>
</div>

 Insert picture description here
 Insert picture description here
The key point is to use “following-sibling” Extract the following sibling nodes

Reference resources :http://xpather.com/

原网站

版权声明
本文为[micromicrofat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206102115179240.html