首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Xpath:选择前面和后面的兄弟姐妹

Xpath:选择前面和后面的兄弟姐妹
EN

Stack Overflow用户
提问于 2022-09-01 11:17:58
回答 1查看 19关注 0票数 1

HTML:

代码语言:javascript
复制
<div class="reviewText" id="game-review">
    <h2>xWays Hoarder xSplit Review</h2>
    <p>While other studios are busy studying Greek mythology or Ancient Rome for their backstory, NoLimit City is contemplating the amount of shit a male produces with an average life-expectancy of 76 years. The <strong>11,030x</strong> potential is literally a reflection of that number (in kilograms), and it triggers the ‘King of Waste’ big win feature when cracked.</p>
    <p>Talk about being too successful to ‘give a shite’ anymore, but please do understand that we mean this in the best possible way. xWays Hoarder xSplit is another stunningly good release from the crafty studio, building on the already established and successful xWays feature, while also adding a brand new and innovative xSplit Wild to the mix.</p>
    <div class="imgText">
        <div class="parentImgText">
            <div class="childImgText"><img alt="Reel-Screen" class="textImgBig blurring lazyloaded" data-src="https://slotcatalog.com/userfiles/image/games/Nolimit-City/20688/xWays-Hoarder-xSplit-6504018.jpg" title="Reel-Screen" src="https://slotcatalog.com/userfiles/image/games/Nolimit-City/20688/xWays-Hoarder-xSplit-6504018.jpg" width="826" height="464"></div>
        </div>
        <span class="titleImg">xWays Hoarder xSplit Slot - Reels Screen</span></div>
    <h2 id="xways-hoarder-xsplit-features">xWays Hoarder xSplit Features</h2>
    <p>xWays symbols can land on the 3 middle reels only, and they always reveal 2 to 4 instances of a randomly selected matching pay symbol. If you land multiple xWays symbols, they all reveal the same matching symbol.</p>
    <p>The newcomer, xSplit Wilds, can land during base game play only, and this symbol will only appear on reels 3, 4 and 5. Whenever they land, all symbols to the left on the same row are split in two. If an xWays symbol is split by the xSplit Wild, the value of the xWays symbol is doubled for every split. The xSplit turns into a regular wild, and this wild can also be split by a new xSplit symbol.</p>
    <p>You trigger the Bunker Raid Bonus Round when you land <strong>3 or 4 Fallout Scatters</strong> anywhere on reels 2 to 5. This awards <strong>7 or 10 Bunker Raid Spins</strong>, respectively. However, if a scatter is split by an xSplit Wild, it turns into a Super Scatter. If you trigger the bonus round with a Super Scatter involved, the Super Scatter and the symbols below turn into sticky xWays symbols.</p>
    <p>All xWays symbols you land during the bonus round are sticky for the duration of the feature, and they also award <strong>+1 extra spin</strong>. The xWays symbols drop down to the bottom row, or the lowest xWays symbol on that reel, and it will then merge with any sticky xWays symbol already present.</p>
    <p>xWays symbols are also collected in a meter, and you reach a new ‘Hoarder Level’ for every 3 you land. Each new Hoarder level removes the lowest remaining character (premium) and object (low value) symbol from the reels. Starting at level zero, the bonus round comes with 3 Hoarder levels on top of that.</p>
    <p>If you manage to reach the top of the <strong>Hoarder meter</strong>, the whole feature shifts to the Wasteland Free Spins round. Only 4 symbols will land during this top-tier bonus round, namely the 2 highest value character/premium symbols and the 2 highest value object symbols.</p>
    <p>The 9 xWays symbols you’ve gathered on the 3 middle reels will now merge to form a mega symbol that covers the entire 3 middle reels per free spin. Each of the merged xWays symbols still come with a symbol count of x2 to x4 however, multiplying with each other per spin to generate potentially massive payouts.</p>
    <p>Non-UK players can take advantage of the <strong>Bonus Buy feature</strong> with the following options:</p>
    <ul>
        <li>Bunker Raid Spins with 7 free spins costs <strong>95x</strong> your stake with a <strong>96.38 %</strong> RTP.</li>
        <li>Bunker Raid Spins with 10 free spins costs <strong>180x</strong> your stake with a <strong>96.38 %</strong> RTP.</li>
        <li>Wasteland Free Spins with 7 free spins costs <strong>777x</strong> your stake with a <strong>96.68 %</strong> RTP.</li>
        <li>Random Mystery option costs <strong>218x</strong> your stake with a <strong>96.5%</strong> RTP.</li>
    </ul>
    <p>In this context, it’s good to keep in mind that the Bonus Round triggers organically once every 307 spins on average.</p>
    <h2 id="the-200-spins-xways-hoarder-xsplit-experience">The 200 Spins xWays Hoarder xSplit Experience</h2>
    <p>We purchase the random bonus round option pretty soon after the video starts, and this gave us 10 bunker raid spins. We landed quite a few xWays symbols, and this kept the feature going for a good while. One big win followed another, and we will definitely be back for more! Check it all out for yourself in the 8-and-a-half-minute highlights video below.</p>

我需要在一个h2之后和另一个h2之前选择所有p和li标记。

我的xpath现在是//div[@id='game-review']//h2/following-sibling::p[preceding-sibling::h2],它不起作用。现在,这段代码返回头部之间带有p标记的所有元素,但我需要为每个带有h2标记的标头获取p。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-09-01 11:42:58

这个XPath将完成以下工作:

代码语言:javascript
复制
//*[self::p or self::*/li][preceding-sibling::h2 and following-sibling::h2]

解释:

[preceding-sibling::h2 and following-sibling::h2]限制了h2标记之间的同级元素。

//*[self::p or self::*/li]选择任何父标记的p标记节点或li子节点。

它工作,您可以检查它这里或任何类似的XPath在线验证器。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73568475

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档